-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe24008
commit eaa6b2b
Showing
2 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Release to PyPI | ||
on: | ||
release: | ||
types: [published, edited] | ||
jobs: | ||
pypi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: extractions/setup-just@v1 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'poetry' | ||
|
||
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}" | ||
- name: install twine | ||
run: | | ||
pip install twine | ||
- name: download release | ||
run: | | ||
tag='${{ github.ref }}' | ||
tag="${tag/refs\/tags\//}" | ||
mkdir dist | ||
cd dist | ||
gh release download "$tag" -p 'extism-*' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: upload release | ||
run: | | ||
twine upload dist/* | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
# Extism Python Host SDK | ||
|
||
See [https://extism.org/docs/integrate-into-your-codebase/python-host-sdk/](https://extism.org/docs/integrate-into-your-codebase/python-host-sdk/). | ||
See [https://extism.org/docs/integrate-into-your-codebase/python-host-sdk/](https://extism.org/docs/integrate-into-your-codebase/python-host-sdk/). | ||
|
||
|
||
## Development | ||
|
||
### Release workflow | ||
|
||
1. Create a semver-formatted git tag (`git tag v1.0.0`). | ||
2. Push that tag to the repository (`git push origin v1.0.0`.) | ||
3. Wait for [the Build workflow to run](https://github.com/extism/python-sdk/actions/workflows/build.yaml). | ||
4. Once the build workflow finishes, go to the [releases](https://github.com/extism/python-sdk/releases) page. You should | ||
see a draft release. | ||
5. Edit the draft release. Publish the release. | ||
6. Wait for [the Release workflow to run](https://github.com/extism/python-sdk/actions/workflows/release.yaml). | ||
7. Once the release workflow completes, you should be able to `pip install extism==${YOUR_TAG}` from PyPI. | ||
|