@@ -3,6 +3,10 @@ name: Publish Release
33on :
44 workflow_dispatch :
55 push :
6+ # Branches only. A tag push and its release event would otherwise start two
7+ # concurrent runs that race to upload the same release assets.
8+ branches :
9+ - " **"
610 release :
711 types :
812 - released
1115permissions :
1216 contents : write
1317
18+ concurrency :
19+ group : ${{ github.workflow }}-${{ github.ref }}
20+ cancel-in-progress : ${{ github.event_name == 'push' }}
21+
1422jobs :
1523 linux :
1624 runs-on : ubuntu-latest
@@ -28,13 +36,17 @@ jobs:
2836 with :
2937 python-version : " 3.13"
3038
39+ - uses : actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # ratchet:actions/setup-python@v4
40+ with :
41+ python-version : " 3.14"
42+
3143 - name : Build wheels
3244 uses : PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # ratchet:PyO3/maturin-action@v1
3345 with :
3446 working-directory : ./vrp-cli
3547 target : ${{ matrix.target }}
3648 sccache : " true"
37- args : --release --out dist -m Cargo.toml -i 3.12 -i 3.13
49+ args : --release --out dist -m Cargo.toml -i 3.12 -i 3.13 -i 3.14
3850 manylinux : auto
3951
4052 - name : Upload wheels
@@ -61,12 +73,17 @@ jobs:
6173 python-version : " 3.13"
6274 architecture : " arm64"
6375
76+ - uses : actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # ratchet:actions/setup-python@v4
77+ with :
78+ python-version : " 3.14"
79+ architecture : " arm64"
80+
6481 - name : Build wheels
6582 uses : PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # ratchet:PyO3/maturin-action@v1
6683 with :
6784 working-directory : ./vrp-cli
6885 target : ${{ matrix.target }}
69- args : --release --out dist -m Cargo.toml -i 3.12 -i 3.13
86+ args : --release --out dist -m Cargo.toml -i 3.12 -i 3.13 -i 3.14
7087 sccache : " true"
7188
7289 - name : Upload wheels
7794
7895 pypi-publish :
7996 name : Publish artifacts to Uptick's Pypi repo
80- if : startsWith(github.ref, 'refs/tags/')
97+ # Manual runs must be dispatched from a tag, so the wheels always match a
98+ # released version.
99+ if : github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags/'))
81100 permissions :
82101 id-token : write
83102 contents : write
@@ -107,7 +126,9 @@ jobs:
107126 uvx s3pypi@2.0.1 upload dist/* --bucket s3pypi-610829907584-us-east-1
108127 gh-publish :
109128 name : Publish artifacts to GH
110- if : startsWith(github.ref, 'refs/tags/')
129+ # Same rule. action-gh-release falls back to github.ref, so a branch dispatch
130+ # would create a release named after the branch.
131+ if : github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags/'))
111132 permissions :
112133 contents : write
113134 needs : [linux, macos]
0 commit comments