|
5 | 5 | tags: |
6 | 6 | - 'v*' |
7 | 7 |
|
8 | | -permissions: |
9 | | - contents: write # needed to create the GitHub release |
10 | | - id-token: write # needed for npm trusted publishing (OIDC) |
| 8 | +permissions: {} |
11 | 9 |
|
12 | 10 | jobs: |
13 | 11 | publish: |
| 12 | + name: publish |
14 | 13 | runs-on: ubuntu-latest |
15 | | - # If you set an "Environment name" on the npm trusted publisher page, |
16 | | - # uncomment the line below and use the same name. This lets you add a |
17 | | - # required-reviewer gate in repo Settings > Environments if you want |
18 | | - # one last manual "approve" click before publish actually runs. |
19 | | - environment: npm-publish |
| 14 | + timeout-minutes: 10 |
| 15 | + |
| 16 | + concurrency: |
| 17 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 18 | + cancel-in-progress: false |
| 19 | + |
| 20 | + environment: |
| 21 | + name: npm-publish |
| 22 | + deployment: false |
| 23 | + |
| 24 | + permissions: |
| 25 | + contents: write # Needed to create the GitHub release |
| 26 | + id-token: write # Needed for npm trusted publishing (OIDC) |
20 | 27 |
|
21 | 28 | steps: |
22 | 29 | - name: Checkout |
23 | | - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 |
| 30 | + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 |
| 31 | + with: |
| 32 | + persist-credentials: false |
24 | 33 |
|
25 | 34 | - name: Setup Node |
26 | | - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e |
| 35 | + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 |
27 | 36 | with: |
28 | 37 | node-version: 24 |
| 38 | + package-manager-cache: false |
29 | 39 | registry-url: 'https://registry.npmjs.org' |
30 | | - cache: 'npm' |
31 | 40 |
|
32 | 41 | - name: Install dependencies |
33 | 42 | run: npm ci |
|
44 | 53 | - name: Publish to npm |
45 | 54 | run: npm publish |
46 | 55 |
|
47 | | - - name: Create GitHub Release |
48 | | - uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda |
49 | | - with: |
50 | | - generate_release_notes: true |
| 56 | + - name: Create GitHub release |
| 57 | + shell: bash |
| 58 | + env: |
| 59 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 60 | + run: | |
| 61 | + gh release create "${GITHUB_REF_NAME}" --generate-notes --repo "${GITHUB_REPOSITORY}" |
0 commit comments