Skip to content

Commit

Permalink
Feat/deploy GitHub Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ishiko732 committed Nov 22, 2023
1 parent 745bb97 commit 3a91546
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Publish Package to npm.js
name: Publish Package

on:
release:
Expand All @@ -16,6 +16,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write # allow GITHUB_TOKEN to publish packages
id-token: write
steps:
- uses: actions/checkout@v2
Expand All @@ -34,9 +35,16 @@ jobs:
id: determine-tag
run: echo "::set-output name=tag::${{ steps.determine-branch.outputs.branch == 'master' && 'latest' || 'beta' }}"

- name: Publish Package
- name: Publish Package to NPM
uses: JS-DevTools/npm-publish@v2
with:
token: ${{secrets.npm_token}}
provenance: true
tag: ${{ steps.determine-tag.outputs.tag }}
- name: Publish Package to GitHub Packages
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
registry: "https://npm.pkg.github.com"
provenance: true
tag: ${{ steps.determine-tag.outputs.tag }}

0 comments on commit 3a91546

Please sign in to comment.