|
1 | | -name: Release |
| 1 | +name: Release build check |
2 | 2 |
|
3 | 3 | on: |
4 | | - pull_request: |
| 4 | + push: |
5 | 5 | branches: |
6 | | - - "master" |
7 | | - - "ci" |
8 | | - - "[0-9]+.[0-9x]+*" |
9 | | - paths: |
10 | | - - "uvloop/_version.py" |
| 6 | + - release-build-check-b63c384 |
11 | 7 |
|
12 | | -jobs: |
13 | | - validate-release-request: |
14 | | - runs-on: ubuntu-latest |
15 | | - steps: |
16 | | - - name: Validate release PR |
17 | | - uses: edgedb/action-release/validate-pr@bae6b9134e872166b43d218dd79397c851c41c9a |
18 | | - id: checkver |
19 | | - with: |
20 | | - require_team: Release Managers |
21 | | - require_approval: no |
22 | | - github_token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }} |
23 | | - version_file: uvloop/_version.py |
24 | | - version_line_pattern: | |
25 | | - __version__\s*=\s*(?:['"])([[:PEP440:]])(?:['"]) |
26 | | -
|
27 | | - - name: Stop if not approved |
28 | | - if: steps.checkver.outputs.approved != 'true' |
29 | | - run: | |
30 | | - echo ::error::PR is not approved yet. |
31 | | - exit 1 |
32 | | -
|
33 | | - - name: Store release version for later use |
34 | | - env: |
35 | | - VERSION: ${{ steps.checkver.outputs.version }} |
36 | | - run: | |
37 | | - mkdir -p dist/ |
38 | | - echo "${VERSION}" > dist/VERSION |
39 | | -
|
40 | | - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
41 | | - with: |
42 | | - name: dist-version |
43 | | - path: dist/ |
| 8 | +permissions: |
| 9 | + contents: read |
44 | 10 |
|
| 11 | +jobs: |
45 | 12 | build-sdist: |
46 | | - needs: validate-release-request |
47 | 13 | runs-on: ubuntu-22.04 |
48 | 14 |
|
49 | 15 | env: |
|
70 | 36 | path: dist/*.tar.* |
71 | 37 |
|
72 | 38 | build-wheels: |
73 | | - needs: validate-release-request |
74 | 39 | runs-on: ${{ matrix.os }} |
75 | 40 | strategy: |
76 | 41 | fail-fast: false |
@@ -147,57 +112,3 @@ jobs: |
147 | 112 | with: |
148 | 113 | name: dist-wheels-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.cibw_arch }} |
149 | 114 | path: wheelhouse/*.whl |
150 | | - |
151 | | - publish: |
152 | | - needs: [build-sdist, build-wheels] |
153 | | - runs-on: ubuntu-latest |
154 | | - |
155 | | - steps: |
156 | | - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 |
157 | | - with: |
158 | | - fetch-depth: 5 |
159 | | - submodules: false |
160 | | - |
161 | | - - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 |
162 | | - with: |
163 | | - pattern: dist-* |
164 | | - merge-multiple: true |
165 | | - path: dist/ |
166 | | - |
167 | | - - name: Extract Release Version |
168 | | - id: relver |
169 | | - run: | |
170 | | - set -e |
171 | | - echo version=$(cat dist/VERSION) >> $GITHUB_OUTPUT |
172 | | - rm dist/VERSION |
173 | | -
|
174 | | - - name: Merge and tag the PR |
175 | | - uses: edgedb/action-release/merge@bae6b9134e872166b43d218dd79397c851c41c9a |
176 | | - with: |
177 | | - github_token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }} |
178 | | - ssh_key: ${{ secrets.RELEASE_BOT_SSH_KEY }} |
179 | | - gpg_key: ${{ secrets.RELEASE_BOT_GPG_KEY }} |
180 | | - gpg_key_id: "5C468778062D87BF!" |
181 | | - tag_name: v${{ steps.relver.outputs.version }} |
182 | | - |
183 | | - - name: Publish Github Release |
184 | | - uses: elprans/gh-action-create-release@master |
185 | | - env: |
186 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
187 | | - with: |
188 | | - tag_name: v${{ steps.relver.outputs.version }} |
189 | | - release_name: v${{ steps.relver.outputs.version }} |
190 | | - target: ${{ github.event.pull_request.base.ref }} |
191 | | - body: ${{ github.event.pull_request.body }} |
192 | | - draft: false |
193 | | - |
194 | | - - run: | |
195 | | - ls -al dist/ |
196 | | -
|
197 | | - - name: Upload to PyPI |
198 | | - uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 |
199 | | - with: |
200 | | - user: __token__ |
201 | | - password: ${{ secrets.PYPI_TOKEN }} |
202 | | - # password: ${{ secrets.TEST_PYPI_TOKEN }} |
203 | | - # repository_url: https://test.pypi.org/legacy/ |
0 commit comments