-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Michael Kantor <[email protected]>
- Loading branch information
1 parent
4e4ee51
commit aa447da
Showing
1 changed file
with
44 additions
and
0 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,44 @@ | ||
name: Publish Canary | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish-canary: | ||
name: Publish Canary | ||
runs-on: wallet-tools-linux-medium | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Setup NodeJS Environment | ||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Create .npmrc | ||
run: | | ||
touch .npmrc | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc | ||
- name: Set prerelease version | ||
run: | | ||
npm version prerelease --preid="canary.$(git rev-parse --short HEAD)" | ||
- name: Publish | ||
run: npm publish --tag canary --public | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|