Skip to content

Commit

Permalink
Merge pull request #36 from vordgi/nt-34
Browse files Browse the repository at this point in the history
nt-34 configure canary release channel
  • Loading branch information
vordgi authored Feb 2, 2024
2 parents 0950f4a + c79fafe commit 43f84ae
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,32 @@ on:
types: [created]

jobs:
publish-npm:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.17.1
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
node-version: '20'

- name: Install dependencies and build
run: |
npm ci
npm run build
- name: Publish on main
if: "!contains(github.ref_name, 'canary')"
run: |
npm set //registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}
npm publish --access public
- name: Publish on canary
if: contains(github.ref_name, 'canary')
run: |
npm set //registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}
npm version --no-git-tag-version ${{github.ref_name}}
npm publish --tag canary --access public

0 comments on commit 43f84ae

Please sign in to comment.