Skip to content

Commit

Permalink
ci: add automatic release scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sileht committed Oct 19, 2023
1 parent 244f3f0 commit 4e3a101
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: upload release to PyPI
on:
push:
tags:
- '*'

jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: read
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: 3.12
- run: |
pip install build
python3 -m build . --wheel --sdist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Tag next release
on:
workflow_dispatch:

jobs:
tag-next-release:
name: Tag next release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
python-version: 3.12
- run: |
pip install build setuptools_scm
tag="$(python3 -m setuptools_scm --strip-dev)"
git tag "$tag"
git push origin "$tag"

0 comments on commit 4e3a101

Please sign in to comment.