Skip to content

Commit

Permalink
add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdickinson committed Oct 5, 2023
1 parent fe24008 commit 632543b
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release to PyPI
on:
release:
types: [published, edited]
jobs:
pypi:
runs-on: ubuntu-latest
steps:
- 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: |
mkdir dist
cd dist
gh release download '${{ github.ref }}' -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 }}

0 comments on commit 632543b

Please sign in to comment.