Skip to content

Commit

Permalink
chore: Update workflow to publish to github packages
Browse files Browse the repository at this point in the history
  • Loading branch information
venikx authored May 3, 2021
1 parent e9404a2 commit 5969a99
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
name: Release to npm registry
name: Publishing package to registries
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14.x"
registry-url: "https://registry.npmjs.org/"
- run: npm install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/checkout@v2
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
with:
node-version: '10.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v1
with:
registry-url: 'https://npm.pkg.github.com'
scope: '@equinor'
# Publish to GitHub Packages
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5969a99

Please sign in to comment.