summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..ab82ace
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,49 @@
+name: release
+
+on:
+ push:
+ tags:
+ - v*
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: true
+ matrix:
+ python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - uses: ./.github/actions/test
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ release:
+ runs-on: ubuntu-latest
+ needs: [test]
+ steps:
+
+ - uses: actions/checkout@v3
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: 3.11
+
+ - name: install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install build twine
+
+ - name: build
+ run: ./run.sh build
+
+ - name: check
+ run: ./run.sh check
+
+ - name: release
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ password: ${{ secrets.PYPI_DEPLOY_TOKEN }}