forked from dr-leo/pandaSDMX
-
Notifications
You must be signed in to change notification settings - Fork 19
58 lines (49 loc) · 1.35 KB
/
publish.yaml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Build package / publish
on:
# On PR commits, check build completes w/o error.
pull_request:
branches: [ main ]
push:
branches: [ main ]
# Publish on any push of a new tag, including
# 'v*rc*' pushed to a PR branch.
tags: [ "v*" ]
# Publish on new releases.
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@v4
# On 'pull_request' and some 'push' events,
# setuptools-scm will produce version '0.1.dev1'.
# To confirm that setuptools-scm generates the
# correct version string, uncomment these lines
# and adjust fetch-depth.
# with:
# fetch-depth: 10
# fetch-tags: true
- uses: astral-sh/setup-uv@v5
with:
cache-dependency-glob: "**/pyproject.toml"
python-version: "3.13"
- name: Build
run: uv build
- name: Publish
if: >-
github.event_name == 'release' || (
github.event_name == 'push'
&& startsWith(github.ref, 'refs/tags')
)
with:
Uncomment for testing
UV_PUBLISH_URL: https://test.pypi.org/legacy/
run: uv publish --trusted-publishing=always