Skip to content

Commit

Permalink
feat: update publish-npm.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Jingyi-Joey committed Nov 27, 2024
1 parent ca2527c commit ce49615
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setting up Node Environment for NPM
uses: actions/setup-node@v1
- name: Setup Node.js Environment
uses: actions/setup-node@v2
with:
node-version: "10.x"
node-version: '16.x'
registry-url: "https://registry.npmjs.org"

- name: Install Dependencies
run: npm ci

Expand All @@ -27,14 +27,10 @@ jobs:
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
- name: Switch to GitHub Package Registry
run: npm config set registry "https://npm.pkg.github.com"

- name: Publish to GitHub Package Registry
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit ce49615

Please sign in to comment.