-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dx(publish): Add Automatic Publish with Provenance
- Loading branch information
1 parent
bc236b2
commit 1c0b268
Showing
5 changed files
with
58 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Pipeline | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: oven-sh/setup-bun@v1 | ||
|
||
- run: bun install | ||
|
||
# update npm for provenance support | ||
- run: npm --version && npm install -g npm && npm --version | ||
|
||
- run: bun test | ||
|
||
- run: bun run build | ||
|
||
- name: dry-publish | ||
run: cd build && npm publish --provenance --dry-run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish Package to NPM | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: oven-sh/setup-bun@v1 | ||
|
||
- run: bun install | ||
|
||
# update npm for provenance support | ||
- run: npm --version && npm install -g npm && npm --version | ||
|
||
# make sure this publish doesn’t break anything | ||
- run: bun test | ||
|
||
- run: bun run build | ||
|
||
- name: publish | ||
run: cd build && npm publish --provenance | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters