Skip to content

Commit

Permalink
Merge pull request #360 from Secreto31126/provenance
Browse files Browse the repository at this point in the history
Actions Update
  • Loading branch information
Secreto31126 authored Aug 4, 2024
2 parents d633a2d + 144eba3 commit 0b8f028
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/alpha-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20.x

- name: Build
run: |
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/npm-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4
Expand All @@ -61,13 +61,16 @@ jobs:
needs: test

runs-on: ubuntu-latest
permissions:
id-token: write

if: ${{ !github.event.release.prerelease }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: actions/download-artifact@v3
with:
Expand All @@ -78,7 +81,7 @@ jobs:
run: sleep 60s

- name: Ok, now publish it
run: npm publish
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

Expand All @@ -87,13 +90,16 @@ jobs:
needs: test

runs-on: ubuntu-latest
permissions:
id-token: write

if: ${{ github.event.release.prerelease }}

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: actions/download-artifact@v3
with:
Expand All @@ -104,7 +110,7 @@ jobs:
run: npm version --no-git-tag-version ${GITHUB_REF/refs\/tags\//}

- name: Beta Release
run: npm publish --tag beta
run: npm publish --tag beta --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
node-version: 20.x
cache: npm
- name: Install
run: npm ci
Expand Down

0 comments on commit 0b8f028

Please sign in to comment.