|
9 | 9 | type: string |
10 | 10 |
|
11 | 11 | jobs: |
12 | | - create-release: |
13 | | - runs-on: ubuntu-latest |
14 | | - steps: |
15 | | - - name: Checkout repo |
16 | | - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 |
17 | | - # Updates changelog and writes the release version into the environment |
18 | | - - name: Update Changelog |
19 | | - run: python3 tools/maint/create_release.py --action |
20 | | - - name: Create Changelog PR |
21 | | - id: cpr |
22 | | - uses: peter-evans/create-pull-request@v6 |
23 | | - with: |
24 | | - token: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }} |
25 | | - title: Mark ${{ env.RELEASE_VERSION }} as released |
26 | | - body: Update changelog and emscripten-version.txt [ci skip] |
27 | | - team-reviewers: release-reviewers |
28 | | - delete-branch: true |
29 | | - - name: Enable auto-merge |
30 | | - run: gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}" |
31 | | - env: |
32 | | - GH_TOKEN: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }} |
33 | | - - name: Tag release sha |
34 | | - uses: actions/github-script@v7 |
35 | | - with: |
36 | | - github-token: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }} |
37 | | - script: | |
38 | | - const tag_sha = '${{ inputs.release-sha }}'; |
39 | | - const release_version = '${{ env.RELEASE_VERSION }}'; |
40 | | - console.log(`Version ${release_version} at SHA ${tag_sha}`); |
41 | | - const regex = /^[0-9]+.[0-9]+.[0-9]+$/; |
42 | | - const match = release_version.match(regex); |
43 | | - if (!match) { |
44 | | - throw new Error('Malformed release version'); |
45 | | - } |
46 | | - await github.rest.git.createRef({ |
47 | | - owner: context.repo.owner, |
48 | | - repo: context.repo.repo, |
49 | | - ref: `refs/tags/${release_version}`, |
50 | | - sha: tag_sha |
51 | | - }); |
| 12 | + create-release: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - name: Checkout repo |
| 16 | + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 |
| 17 | + # Updates changelog and writes the release version into the environment |
| 18 | + - name: Update Changelog |
| 19 | + run: python3 tools/maint/create_release.py --action |
| 20 | + - name: Create Changelog PR |
| 21 | + id: cpr |
| 22 | + uses: peter-evans/create-pull-request@v6 |
| 23 | + with: |
| 24 | + token: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }} |
| 25 | + title: Mark ${{ env.RELEASE_VERSION }} as released |
| 26 | + body: Update changelog and emscripten-version.txt [ci skip] |
| 27 | + team-reviewers: release-reviewers |
| 28 | + delete-branch: true |
| 29 | + - name: Enable auto-merge |
| 30 | + run: gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}" |
| 31 | + env: |
| 32 | + GH_TOKEN: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }} |
| 33 | + - name: Tag release sha |
| 34 | + uses: actions/github-script@v7 |
| 35 | + with: |
| 36 | + github-token: ${{ secrets.EMSCRIPTEN_BOT_TOKEN }} |
| 37 | + script: | |
| 38 | + const tag_sha = '${{ inputs.release-sha }}'; |
| 39 | + const release_version = '${{ env.RELEASE_VERSION }}'; |
| 40 | + console.log(`Version ${release_version} at SHA ${tag_sha}`); |
| 41 | + const regex = /^[0-9]+.[0-9]+.[0-9]+$/; |
| 42 | + const match = release_version.match(regex); |
| 43 | + if (!match) { |
| 44 | + throw new Error('Malformed release version'); |
| 45 | + } |
| 46 | + await github.rest.git.createRef({ |
| 47 | + owner: context.repo.owner, |
| 48 | + repo: context.repo.repo, |
| 49 | + ref: `refs/tags/${release_version}`, |
| 50 | + sha: tag_sha |
| 51 | + }); |
| 52 | +
|
0 commit comments