Skip to content

Commit

Permalink
updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lstillwe committed Sep 18, 2024
1 parent ab449b3 commit e62a6af
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
name: Node.js Package

name: Publish
on:
release:
types: [created]

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

publish-gpr:
needs: build
publish:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm install
- run: npm run build
- run: |
echo @RENCI:https://npm.pkg.github.com/ > build/.npmrc
echo '//npm.pkg.github.com/:_authToken=${NPM_TOKEN}' >> build/.npmrc
- run: npm publish
working-directory: ./build
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e62a6af

Please sign in to comment.