summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Lorey <git@karllorey.com>2022-06-21 10:56:08 +0200
committerKarl Lorey <git@karllorey.com>2022-06-21 10:56:08 +0200
commit3605f2d4d9068debd294e82175040bba1c2eb3ac (patch)
tree1858ee3d9a2c39a7030f2312abeca2a90a19b7a2
parent7c8ac974d22490eec45a8e183ebb742583593a08 (diff)
Add release workflow
-rw-r--r--.github/workflows/release.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..f9bcc4f
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,33 @@
+name: release
+
+on:
+ push:
+ tags:
+ - 'v*'
+
+jobs:
+ pypi:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ persist-credentials: false
+ - name: Setup Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: "3.x"
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install setuptools wheel twine
+ - name: Build
+ run: |
+ python setup.py sdist bdist_wheel
+ - name: Publish a Python distribution to PyPI
+ if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
+ uses: pypa/gh-action-pypi-publish@master
+ with:
+ user: __token__
+ password: ${{ secrets.PYPI_API_TOKEN }}
+ skip_existing: true
+ verbose: true