Skip to content

Commit

Permalink
build: add gpr publish step in cd action fp-59 (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
what1s1ove authored Dec 7, 2023
1 parent 9c5089b commit 78cacbf
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
registry-url: 'https://registry.npmjs.org'
registry-url: https://registry.npmjs.org

- name: Download Artifact
uses: actions/download-artifact@v3
Expand All @@ -112,3 +112,29 @@ jobs:
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

gpr-publish:
name: GPR Publish
needs: build
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v4

- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
registry-url: https://npm.pkg.github.com

- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_PATH }}

- name: Publish
working-directory: ${{ env.ARTIFACT_PATH }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 78cacbf

Please sign in to comment.