Skip to content

Commit

Permalink
Adding release.yml for CI release job (#21)
Browse files Browse the repository at this point in the history
* Addind release.yml for CI release job

* Adding testpypi step for pre-releases

* Using latest actions versions

* v5 for setup-python action
  • Loading branch information
ktsitsi authored Dec 11, 2024
1 parent f039245 commit 814f3f7
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release
on:
release:
types: [ 'published' ]

jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- name: Setup Python
uses: actions/setup-python@v5
- name: Checkout
uses: actions/checkout@v4
- name: Build package
run: pip install build && python -m build && ls -l dist
- name: Publish package distributions to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
continue-on-error: true
with:
repository_url: https://test.pypi.org/legacy/
- name: Publish package distributions to PyPI
if: "!github.event.release.prerelease"
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 814f3f7

Please sign in to comment.