-
Notifications
You must be signed in to change notification settings - Fork 34
executable file
·34 lines (33 loc) · 1015 Bytes
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Release
on:
release:
types:
- published
jobs:
release:
name: Build & Deploy to PyPI
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
# - name: Ensure latest tag is in setup.py if i forgot
# run: |
# sed -i "s/version=\"[0-9\.]*\"/version=\"$(git describe --tags)\"/g" setup.py
# git config user.name github-actions
# git config user.email [email protected]
# git add setup.py
# git commit -m "Ensure setup.py contains the latest tag"
# git push
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: pip install wheel
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Upload package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}