|
1 | 1 | name: Release to PyPI |
2 | 2 |
|
3 | 3 | on: |
4 | | -push: |
| 4 | + push: |
5 | 5 | tags: |
6 | | - - "v*.*.*" |
| 6 | + - "v*.*.*" |
7 | 7 |
|
8 | 8 | permissions: |
9 | | -contents: write |
10 | | -id-token: write |
| 9 | + contents: write |
| 10 | + id-token: write |
11 | 11 |
|
12 | 12 | jobs: |
13 | | -test: |
| 13 | + test: |
14 | 14 | name: Run Tests |
15 | 15 | runs-on: ubuntu-latest |
16 | 16 | steps: |
17 | | - - uses: actions/checkout@v4 |
| 17 | + - uses: actions/checkout@v4 |
18 | 18 |
|
19 | | - - name: Install uv |
| 19 | + - name: Install uv |
20 | 20 | uses: astral-sh/setup-uv@v5 |
21 | 21 | with: |
22 | | - enable-cache: true |
| 22 | + enable-cache: true |
23 | 23 |
|
24 | | - - name: Set up Python |
| 24 | + - name: Set up Python |
25 | 25 | run: uv python install 3.13 |
26 | 26 |
|
27 | | - - name: Install dependencies |
| 27 | + - name: Install dependencies |
28 | 28 | run: uv sync --all-extras --dev |
29 | 29 |
|
30 | | - - name: Run tests |
| 30 | + - name: Run tests |
31 | 31 | run: uv run pytest |
32 | 32 |
|
33 | | -build: |
| 33 | + build: |
34 | 34 | name: Build Package |
35 | 35 | runs-on: ubuntu-latest |
36 | 36 | needs: test |
37 | 37 | steps: |
38 | | - - uses: actions/checkout@v4 |
| 38 | + - uses: actions/checkout@v4 |
39 | 39 |
|
40 | | - - name: Install uv |
| 40 | + - name: Install uv |
41 | 41 | uses: astral-sh/setup-uv@v5 |
42 | 42 | with: |
43 | | - enable-cache: true |
| 43 | + enable-cache: true |
44 | 44 |
|
45 | | - - name: Set up Python |
| 45 | + - name: Set up Python |
46 | 46 | run: uv python install 3.13 |
47 | 47 |
|
48 | | - - name: Build package |
| 48 | + - name: Build package |
49 | 49 | run: uv build |
50 | 50 |
|
51 | | - - name: Upload dist artifacts |
| 51 | + - name: Upload dist artifacts |
52 | 52 | uses: actions/upload-artifact@v4 |
53 | 53 | with: |
54 | | - name: dist |
55 | | - path: dist/ |
| 54 | + name: dist |
| 55 | + path: dist/ |
56 | 56 |
|
57 | | -publish-pypi: |
| 57 | + publish-pypi: |
58 | 58 | name: Publish to PyPI |
59 | 59 | runs-on: ubuntu-latest |
60 | 60 | needs: build |
61 | 61 | environment: |
62 | | - name: pypi |
63 | | - url: https://pypi.org/p/tmdbfusion |
| 62 | + name: "pypi" |
| 63 | + url: https://pypi.org/p/tmdbfusion |
64 | 64 | steps: |
65 | | - - name: Download dist artifacts |
| 65 | + - name: Download dist artifacts |
66 | 66 | uses: actions/download-artifact@v4 |
67 | 67 | with: |
68 | | - name: dist |
69 | | - path: dist/ |
| 68 | + name: dist |
| 69 | + path: dist/ |
70 | 70 |
|
71 | | - - name: Publish to PyPI |
| 71 | + - name: Publish to PyPI |
72 | 72 | uses: pypa/gh-action-pypi-publish@release/v1 |
73 | 73 |
|
74 | | -github-release: |
| 74 | + github-release: |
75 | 75 | name: Create GitHub Release |
76 | 76 | runs-on: ubuntu-latest |
77 | 77 | needs: publish-pypi |
78 | 78 | steps: |
79 | | - - uses: actions/checkout@v4 |
| 79 | + - uses: actions/checkout@v4 |
80 | 80 |
|
81 | | - - name: Download dist artifacts |
| 81 | + - name: Download dist artifacts |
82 | 82 | uses: actions/download-artifact@v4 |
83 | 83 | with: |
84 | | - name: dist |
85 | | - path: dist/ |
| 84 | + name: dist |
| 85 | + path: dist/ |
86 | 86 |
|
87 | | - - name: Create GitHub Release |
| 87 | + - name: Create GitHub Release |
88 | 88 | uses: softprops/action-gh-release@v2 |
89 | 89 | with: |
90 | | - files: dist/* |
91 | | - generate_release_notes: true |
92 | | - draft: false |
93 | | - prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }} |
| 90 | + files: dist/* |
| 91 | + generate_release_notes: true |
| 92 | + draft: false |
| 93 | + prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }} |
0 commit comments