forked from iiasa/message-ix-models
-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (26 loc) · 781 Bytes
/
Copy pathpublish.yaml
File metadata and controls
30 lines (26 loc) · 781 Bytes
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
name: Build package / publish
on:
pull_request: { branches: [ main ] }
push: { tags: [ "v*" ] }
release: { types: [ published ] }
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
publish:
environment: { name: publish }
permissions: { id-token: write }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with: { python-version: "3.14" }
- run: uv build
- run: uv publish --trusted-publishing=always
if: >-
github.event_name == 'release' || (
github.event_name == 'push'
&& startsWith(github.ref, 'refs/tags')
)
# Uncomment for testing
# env: { UV_PUBLISH_URL: "https://test.pypi.org/legacy/" }