Skip to content

Commit

Permalink
Update github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rgunindi committed Dec 15, 2024
1 parent d1c4025 commit faf4f18
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
name: Node.js Package

on:
push:
branches: [ main ]
release:
types: [created]

jobs:
build:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm test

publish-npm:
needs: build-and-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-gpr:
needs: build
needs: build-and-test
runs-on: ubuntu-latest
permissions:
packages: write
Expand All @@ -25,9 +42,9 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
registry-url: 'https://npm.pkg.github.com'
scope: '@rgunindi'
env:
NODE_AUTH_TOKEN: ${{secrets._GITHUB_TOKEN}}
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets._GITHUB_TOKEN }}

0 comments on commit faf4f18

Please sign in to comment.