Publishing Package to Registries #15
Workflow file for this 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
name: Publishing Package to Registries | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setting up Node Environment for NPM | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "10.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install Dependencies | |
run: npm ci | |
- name: Publish to NPM Registry | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Setting up Node Environment for GitHub Package Registry | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "10.x" | |
registry-url: "https://npm.pkg.github.com" | |
scope: "@equinor" | |
- name: Publish to GitHub Registry | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |