Skip to content

Commit

Permalink
Publish with Provenance (#3426)
Browse files Browse the repository at this point in the history
* Publish with provenance

* Update release-canary.yml

* Upgrade actions

* Upgrade actions in canary ci

---------

Co-authored-by: Colin McDonnell <colinmcd94@gmail.com>
  • Loading branch information
samchungy and colinhacks authored Apr 21, 2024
1 parent 8b8734d commit 6c6161f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/release-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ on:
jobs:
build_and_publish:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
id-token: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Set up Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 16

Expand All @@ -38,8 +41,9 @@ jobs:
- id: publish
name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
dry-run: false
tag: canary
provenance: true
18 changes: 11 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,22 @@ on:
jobs:
build_and_publish:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
id-token: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true

- name: Set up Node
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Checkout zod-deno
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
token: ${{ secrets.ZOD_BOT_TOKEN }}
repository: colinhacks/zod-deno
Expand All @@ -42,10 +45,11 @@ jobs:
- id: publish
name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
dry-run: false
provenance: true

- name: Post-publish
if: steps.publish.outputs.type != 'none'
Expand Down

0 comments on commit 6c6161f

Please sign in to comment.