Skip to content

Commit b7743f5

Browse files
authored
🔧 Add publishing GH action (#20)
1 parent 6d78228 commit b7743f5

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: CI
22
on:
33
push:
44
branches: [main]
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+*"
57
pull_request:
68
jobs:
79

@@ -67,3 +69,27 @@ jobs:
6769
uses: re-actors/alls-green@release/v1
6870
with:
6971
jobs: ${{ toJSON(needs) }}
72+
73+
publish:
74+
75+
name: Publish to PyPi
76+
needs:
77+
- check
78+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: Checkout source
82+
uses: actions/checkout@v4
83+
- name: Set up Python 3.10
84+
uses: actions/setup-python@v5
85+
with:
86+
python-version: "3.10"
87+
- name: install flit
88+
run: |
89+
pip install flit~=3.4
90+
- name: Build and publish
91+
run: |
92+
flit publish
93+
env:
94+
FLIT_USERNAME: __token__
95+
FLIT_PASSWORD: ${{ secrets.PYPI }}

0 commit comments

Comments
 (0)