publish workflow

This commit is contained in:
Michael Yang
2023-12-21 12:25:10 -08:00
parent dabcca6a1f
commit 9d93f70806
2 changed files with 32 additions and 5 deletions

24
.github/workflows/publish.yaml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: publish
on:
release:
types:
- created
jobs:
publish:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- uses: actions/setup-python@v5
with:
cache: poetry
- run: |
poetry version -- ${GIT_REF_NAME#v}
poetry build
- uses: pypa/gh-action-pypi-publish@release/v1
- run: gh release upload $GIT_REF_NAME dist/*