|
20 | 20 |
|
21 | 21 | jobs: |
22 | 22 | release-ionicons: |
23 | | - uses: ./.github/workflows/release-ionicons.yml |
24 | | - with: |
25 | | - tag: ${{ inputs.tag }} |
26 | | - version: ${{ inputs.version }} |
27 | | - secrets: |
28 | | - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
29 | | - |
30 | | - finalize-release: |
31 | | - needs: [release-ionicons] |
32 | | - runs-on: ubuntu-latest |
33 | | - steps: |
34 | | - - uses: actions/checkout@v4 |
35 | | - with: |
36 | | - token: ${{ secrets.IONITRON_TOKEN }} |
37 | | - fetch-depth: 0 |
38 | | - - name: Configure Identity |
39 | | - # Commits from github-actions do not |
40 | | - # trigger other GitHub Actions. As a result, |
41 | | - # we publish releases from Ionitron instead |
42 | | - # so actions run when merging the release branch |
43 | | - # back into main. |
44 | | - run: | |
45 | | - git config user.name ionitron |
46 | | - git config user.email hi@ionicframework.com |
47 | | - shell: bash |
48 | | - # This ensures the local version of Lerna is installed |
49 | | - # and that we do not use the global Lerna version. We currently |
50 | | - # rely on functionality that does not exist in newer versions of Lerna. |
51 | | - - name: Install root dependencies |
52 | | - run: npm ci |
53 | | - shell: bash |
54 | | - - name: Create GitHub Release |
55 | | - run: npx lerna@5 version ${{ inputs.version }} --yes --force-publish='*' --conventional-commits --create-release github |
56 | | - env: |
57 | | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
58 | | - shell: bash |
59 | | - |
60 | | - update-package-lock: |
61 | | - # This needs to run after finalize-release |
62 | | - # because we also push to the repo in that |
63 | | - # job. If these jobs ran in parallel then it is |
64 | | - # possible for them to push at the same time. |
65 | | - needs: [finalize-release] |
66 | 23 | runs-on: ubuntu-latest |
| 24 | + permissions: |
| 25 | + id-token: write |
67 | 26 | steps: |
68 | | - - uses: actions/checkout@v4 |
69 | | - # Pull the latest version of the reference |
70 | | - # branch instead of the revision that triggered |
71 | | - # the workflow otherwise we won't get the commit |
72 | | - # created in the previous job and this next job |
73 | | - # will fail. |
| 27 | + - name: Checkout |
| 28 | + uses: actions/checkout@v4 |
| 29 | + - name: Publish to NPM |
| 30 | + uses: ./.github/workflows/actions/publish-npm |
74 | 31 | with: |
75 | | - ref: ${{ github.ref }} |
76 | | - - name: Configure Identity |
77 | | - # Commits from github-actions do not |
78 | | - # trigger other GitHub Actions. As a result, |
79 | | - # we push from Ionitron instead so actions |
80 | | - # run when merging the release branch |
81 | | - # back into main. |
82 | | - run: | |
83 | | - git config user.name ionitron |
84 | | - git config user.email hi@ionicframework.com |
85 | | - shell: bash |
86 | | - # Lerna does not automatically bump versions |
87 | | - # of Ionicons dependencies that have changed, |
88 | | - # so we do that here. |
89 | | - - name: Bump Package Lock |
90 | | - run: | |
91 | | - npx lerna@5 exec "npm install --package-lock-only --legacy-peer-deps" |
92 | | - git add . |
93 | | - git commit -m "chore(): update package lock files" |
94 | | - git push |
95 | | - env: |
96 | | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
97 | | - shell: bash |
| 32 | + tag: ${{ inputs.tag }} |
| 33 | + version: ${{ inputs.version }} |
| 34 | + working-directory: './' |
| 35 | + token: ${{ secrets.NPM_TOKEN }} |
| 36 | + createRelease: true |
| 37 | + ghToken: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments