summaryrefslogtreecommitdiff
path: root/.github/workflows/release.yml
diff options
context:
space:
mode:
authorJames Socol <me@jamessocol.com>2022-12-04 11:57:38 -0500
committerGitHub <noreply@github.com>2022-12-04 11:57:38 -0500
commit3fa4353ba32e40a003016f6f59c714acc2adc7de (patch)
tree7c72b5bfdda786c121f334ae70e3048a35367077 /.github/workflows/release.yml
parenta6084e93e11b3717780b6fc45011c6cb81c4a271 (diff)
parent47d6cf824c6f37294a34563c94c26010c5ccee8d (diff)
downloadpystatsd-main.tar.gz
Merge pull request #181 from jsocol/automate-releaseHEADmain
Automate Releases
Diffstat (limited to '.github/workflows/release.yml')
-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 }}