|
12 | 12 | DEFAULT_BRANCH: version-0 |
13 | 13 |
|
14 | 14 | jobs: |
15 | | - update-changelog: |
| 15 | + wait-for-ci: |
| 16 | + name: Wait for CI/CD to pass |
16 | 17 | runs-on: ubuntu-latest |
17 | 18 | steps: |
18 | | - - name: Checkout tag for build & publish |
19 | | - uses: actions/checkout@v4 |
| 19 | + - name: Wait for CI/CD workflow |
| 20 | + |
20 | 21 | with: |
21 | | - token: ${{ secrets.GITHUB_TOKEN }} |
| 22 | + ref: ${{ github.event.release.tag_name }} |
| 23 | + check-regexp: 'Python v.*' |
| 24 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 25 | + wait-interval: 30 |
22 | 26 |
|
23 | | - # TODO: Add build/publish steps here that use the tagged version |
| 27 | + build: |
| 28 | + name: Build distribution packages |
| 29 | + needs: wait-for-ci |
| 30 | + runs-on: ubuntu-latest |
| 31 | + steps: |
| 32 | + - uses: actions/checkout@v5 |
| 33 | + with: |
| 34 | + persist-credentials: false |
| 35 | + - name: Install uv |
| 36 | + uses: astral-sh/setup-uv@v6 |
| 37 | + - name: Build |
| 38 | + run: uv build |
| 39 | + - name: Store the distribution packages |
| 40 | + uses: actions/upload-artifact@v4 |
| 41 | + with: |
| 42 | + name: distributions |
| 43 | + path: dist/ |
24 | 44 |
|
| 45 | + update-changelog: |
| 46 | + needs: |
| 47 | + - build |
| 48 | + runs-on: ubuntu-latest |
| 49 | + steps: |
25 | 50 | - name: Checkout default branch for changelog |
26 | | - uses: actions/checkout@v4 |
| 51 | + uses: actions/checkout@v5 |
27 | 52 | with: |
28 | 53 | token: ${{ secrets.GITHUB_TOKEN }} |
29 | 54 | ref: ${{ env.DEFAULT_BRANCH }} |
|
34 | 59 | file: CHANGELOG.md |
35 | 60 | github_token: ${{ secrets.GITHUB_TOKEN }} |
36 | 61 | pull_request: true |
| 62 | + |
| 63 | + publish-to-testpypi: |
| 64 | + name: Publish to TestPyPI |
| 65 | + needs: |
| 66 | + - build |
| 67 | + runs-on: ubuntu-latest |
| 68 | + environment: |
| 69 | + name: testpypi |
| 70 | + url: https://test.pypi.org/p/aurora-dsql-django |
| 71 | + permissions: |
| 72 | + id-token: write |
| 73 | + steps: |
| 74 | + - name: Download all the dists |
| 75 | + uses: actions/download-artifact@v5 |
| 76 | + with: |
| 77 | + name: distributions |
| 78 | + path: dist/ |
| 79 | + - name: Publish distribution packages to TestPyPI |
| 80 | + uses: pypa/gh-action-pypi-publish@release/v1 |
| 81 | + with: |
| 82 | + repository-url: https://test.pypi.org/legacy/ |
| 83 | + |
| 84 | + publish-to-pypi: |
| 85 | + name: Publish to PyPI |
| 86 | + needs: |
| 87 | + - publish-to-testpypi |
| 88 | + runs-on: ubuntu-latest |
| 89 | + environment: |
| 90 | + name: pypi |
| 91 | + url: https://pypi.org/p/aurora-dsql-django |
| 92 | + permissions: |
| 93 | + id-token: write |
| 94 | + steps: |
| 95 | + - name: Download all the dists |
| 96 | + uses: actions/download-artifact@v5 |
| 97 | + with: |
| 98 | + name: distributions |
| 99 | + path: dist/ |
| 100 | + - name: Publish distribution packages to PyPI |
| 101 | + uses: pypa/gh-action-pypi-publish@release/v1 |
0 commit comments