From 791529959592299211254a7eb44b67897ba24dd3 Mon Sep 17 00:00:00 2001 From: wang1212 Date: Sun, 1 May 2022 01:57:48 +0800 Subject: [PATCH] ci: update the configuration for publishing gpr :green_heart: --- .github/workflows/release-package.yml | 58 ++++++++++++++------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml index 6fa1554..59b0f21 100644 --- a/.github/workflows/release-package.yml +++ b/.github/workflows/release-package.yml @@ -1,33 +1,35 @@ -name: Node.js Package +name: Node.js Package Release 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: 12 - - run: npm ci - - run: npm test + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '14.x' + - 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: 12 - registry-url: https://npm.pkg.github.com/ - - 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: '14.x' + - run: npm ci + - uses: actions/setup-node@v3 + with: + registry-url: https://npm.pkg.github.com/ + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}