momegas commited on
Commit
7895d48
β€’
1 Parent(s): 5ccaabd

πŸš€ Add realease workflow

Browse files
Files changed (1) hide show
  1. .github/workflows/release.yml +30 -0
.github/workflows/release.yml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Release PyPI Package
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ release_package:
9
+ permissions:
10
+ contents: write
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v2
15
+ with:
16
+ fetch-depth: 0
17
+
18
+ - name: Set up Python 3.10
19
+ uses: actions/setup-python@v2
20
+ with:
21
+ python-version: 3.10
22
+
23
+ - name: Build a binary wheel and a source tarball.
24
+ run: pip install wheel && python setup.py sdist bdist_wheel
25
+
26
+ - name: Publish distribution πŸ“¦ to PyPI
27
+ if: startsWith(github.ref, 'refs/tags')
28
+ uses: pypa/gh-action-pypi-publish@release/v1
29
+ with:
30
+ password: ${{ secrets.PYPI_API_TOKEN }}