|
13 | 13 | jobs: |
14 | 14 | ci: |
15 | 15 | runs-on: ubuntu-latest |
| 16 | + permissions: |
| 17 | + id-token: write |
| 18 | + contents: write |
| 19 | + pull-requests: write |
16 | 20 | if: | |
17 | 21 | github.event.pull_request.head.repo.full_name == github.repository || |
18 | 22 | (github.ref == 'refs/heads/master' && github.event_name == 'push') |
19 | 23 | steps: |
20 | 24 | - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3.0.0 |
21 | 25 | with: |
22 | | - token: '${{ secrets.BOT_TOKEN }}' |
| 26 | + token: '${{ secrets.GITHUB_TOKEN }}' |
| 27 | + fetch-depth: 0 |
| 28 | + |
| 29 | + - name: Setup Node.js and Authenticate with npm |
| 30 | + uses: actions/setup-node@v4 |
| 31 | + with: |
| 32 | + node-version: '20' |
| 33 | + registry-url: 'https://registry.npmjs.org' |
23 | 34 |
|
24 | 35 | - name: Build packages |
25 | 36 | uses: ./.github/actions/build |
26 | 37 |
|
27 | | - - name: prepare npm access |
28 | | - run: echo '//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}' >> ~/.npmrc |
29 | | - # https://github.com/lerna/lerna/issues/2788 --no-verify-access |
30 | | - # https://github.com/lerna/lerna/issues/1893 --preid ${{ github.sha }} |
31 | 38 | - name: prerelease |
32 | 39 | if: | |
33 | 40 | !contains(github.head_ref, 'dependabot') && |
|
36 | 43 | yarn release:canary \ |
37 | 44 | --yes --no-verify-access \ |
38 | 45 | --dist-tag '${{ github.event.pull_request.head.sha }}' --preid '${{ github.event.pull_request.head.sha }}' \ |
| 46 | + --npm-publish-args="--provenance" \ |
39 | 47 | | tee __publish-log.txt |
40 | 48 |
|
41 | 49 | - name: Comment on PR |
|
49 | 57 | github.event_name == 'push' && |
50 | 58 | github.ref == 'refs/heads/master' |
51 | 59 | env: |
52 | | - GH_TOKEN: '${{ secrets.BOT_TOKEN }}' |
| 60 | + GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}' |
53 | 61 | run: | |
54 | 62 | git config user.name "GitHub Actions Build" |
55 | 63 | git config user.email "[email protected]" |
56 | 64 | yarn release:check |
57 | | - yarn release:latest --yes --no-verify-access |
| 65 | + yarn release:latest --yes --no-verify-access --npm-publish-args="--provenance" |
0 commit comments