File tree Expand file tree Collapse file tree 1 file changed +24
-12
lines changed
Expand file tree Collapse file tree 1 file changed +24
-12
lines changed Original file line number Diff line number Diff line change 11name : Build package / publish
22
33on :
4- push :
5- branches : [ main ]
6- tags : [ "v*" ]
7- release :
8- types : [ published ]
9- # Check that package can be built even on PRs
10- pull_request :
11- branches : [ main ]
4+ pull_request : { branches: [ main ] }
5+ push : { tags: [ "v*" ] }
6+ release : { types: [ published ] }
127
8+ concurrency :
9+ group : ${{ github.workflow }}-${{ github.ref }}
10+ cancel-in-progress : true
1311
1412jobs :
1513 publish :
16- uses : iiasa/actions/.github/workflows/publish.yaml@main
17- secrets :
18- PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
19- TESTPYPI_TOKEN : ${{ secrets.TESTPYPI_TOKEN }}
14+ environment : { name: publish }
15+ permissions : { id-token: write }
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - uses : actions/checkout@v6
20+ - uses : astral-sh/setup-uv@v7
21+ with : { python-version: "3.14" }
22+ - run : uv build
23+ - run : uv publish --trusted-publishing=always
24+ if : >-
25+ github.event_name == 'release' || (
26+ github.event_name == 'push'
27+ && startsWith(github.ref, 'refs/tags')
28+ )
29+ # Uncomment for testing
30+ # env: { UV_PUBLISH_URL: "https://test.pypi.org/legacy/" }
31+
You can’t perform that action at this time.
0 commit comments