From 0e35973e4e346b487cd5b9ecb6f6eceb74d04c67 Mon Sep 17 00:00:00 2001 From: Simon Milfred Date: Mon, 16 Oct 2023 14:07:14 +0200 Subject: [PATCH] Update release-package.yml --- .github/workflows/release-package.yml | 68 +++++++++++++++------------ 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml index b25229d..3b54f1d 100644 --- a/.github/workflows/release-package.yml +++ b/.github/workflows/release-package.yml @@ -1,35 +1,43 @@ -name: Node.js Package +name: Release Package on: - release: - types: [created] + release: + types: [created] jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - run: npm install - - run: npm ci - - run: npm test + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: read + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16.18 + registry-url: 'https://npm.pkg.github.com' + - run: npm install + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - run: npm ci + - run: npm test - publish-gpr: - needs: build - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - registry-url: https://npm.pkg.github.com/ - - run: npm install - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + publish-gpr: + needs: build + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16.18 + registry-url: https://npm.pkg.github.com/ + - run: npm install + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}