|
1 |
| -name: Release |
2 |
| - |
3 |
| -on: |
4 |
| - push: |
5 |
| - tags: |
6 |
| - # Publish on any tag starting with a `v`, e.g. v1.2.3 |
7 |
| - - v* |
8 |
| - |
9 |
| -jobs: |
10 |
| - pypi: |
11 |
| - name: Publish to PyPI |
12 |
| - runs-on: ubuntu-latest |
13 |
| - container: nvidia/cuda:12.8.1-devel-ubuntu24.04 |
14 |
| - # Environment and permissions trusted publishing. |
15 |
| - environment: |
16 |
| - # Create this environment in the GitHub repository under Settings -> Environments |
17 |
| - name: release |
18 |
| - permissions: |
19 |
| - id-token: write |
20 |
| - steps: |
21 |
| - - uses: actions/checkout@v4 |
22 |
| - - uses: astral-sh/setup-uv@v3 |
23 |
| - with: |
24 |
| - version: 0.6.9 |
25 |
| - enable-cache: true |
26 |
| - - name: Get Pyproject Version |
27 |
| - run: | |
| 1 | + name: Release |
| 2 | + |
| 3 | + on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + # Publish on any tag starting with a `v`, e.g. v1.2.3 |
| 7 | + - v* |
| 8 | + |
| 9 | + jobs: |
| 10 | + pypi: |
| 11 | + name: Publish to PyPI |
| 12 | + runs-on: ubuntu-latest |
| 13 | + container: nvidia/cuda:12.8.1-devel-ubuntu24.04 |
| 14 | + # Environment and permissions trusted publishing. |
| 15 | + environment: |
| 16 | + # Create this environment in the GitHub repository under Settings -> Environments |
| 17 | + name: release |
| 18 | + permissions: |
| 19 | + id-token: write |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v4 |
| 22 | + - uses: astral-sh/setup-uv@v3 |
| 23 | + with: |
| 24 | + version: 0.6.9 |
| 25 | + enable-cache: true |
| 26 | + - name: Get Pyproject Version |
| 27 | + run: | |
28 | 28 | export PYPROJECT_VERSION=v$(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version)
|
29 | 29 | echo "PYPROJECT_VERSION=$PYPROJECT_VERSION" >> "$GITHUB_ENV"
|
30 |
| - - name: Validate version with tag |
31 |
| - if: ${{ github.ref_name != env.PYPROJECT_VERSION }} |
32 |
| - uses: actions/github-script@v3 |
33 |
| - with: |
34 |
| - script: | |
| 30 | + - name: Validate version with tag |
| 31 | + if: ${{ github.ref_name != env.PYPROJECT_VERSION }} |
| 32 | + uses: actions/github-script@v3 |
| 33 | + with: |
| 34 | + script: | |
35 | 35 | core.setFailed('Tag version ${{ github.ref_name }} does not match pyproject version ${{ env.PYPROJECT_VERSION }}')
|
36 |
| - - name: Build wheel |
37 |
| - run: uv build |
38 |
| - - name: Publish wheel |
39 |
| - run: uv publish --trusted-publishing always |
| 36 | + - name: Build wheel |
| 37 | + run: uv build |
| 38 | + - name: Publish wheel |
| 39 | + run: uv publish --trusted-publishing always |
0 commit comments