Skip to content

Commit 0b4b182

Browse files
committed
ci: add PyPI publishing to tag release workflow
1 parent 3cdd9e5 commit 0b4b182

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/tag-release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919

20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.11'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install tox twine wheel setuptools
29+
2030
- name: Get version from file
2131
id: get_version
2232
run: |
@@ -28,3 +38,12 @@ jobs:
2838
git config --local user.name "github-actions[bot]"
2939
git tag -a "v${{ steps.get_version.outputs.version }}" -m "Release version ${{ steps.get_version.outputs.version }}"
3040
git push origin "v${{ steps.get_version.outputs.version }}"
41+
42+
- name: Make release script executable
43+
run: chmod +x release.sh
44+
45+
- name: Publish to PyPI
46+
env:
47+
TWINE_USERNAME: __token__
48+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
49+
run: ./release.sh

0 commit comments

Comments
 (0)