From a2fc7cc981e7cf194c4890b17c80d0c2d78b00cd Mon Sep 17 00:00:00 2001 From: young-do Date: Mon, 22 Aug 2022 20:43:17 +0900 Subject: [PATCH] change to npm publish --- ...ithub-packages.yml => release-packages.yml} | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) rename .github/workflows/{npm-publish-github-packages.yml => release-packages.yml} (70%) diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/release-packages.yml similarity index 70% rename from .github/workflows/npm-publish-github-packages.yml rename to .github/workflows/release-packages.yml index 42f900b..3447f68 100644 --- a/.github/workflows/npm-publish-github-packages.yml +++ b/.github/workflows/release-packages.yml @@ -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://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages -name: Node.js Package +name: npm-publish on: release: @@ -15,22 +15,20 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 16 - - run: npm ci - - run: npm test + - run: yarn install + - run: yarn test - publish-gpr: + publish-npm: needs: build runs-on: ubuntu-latest - permissions: - contents: read - packages: write steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: 16 - registry-url: https://npm.pkg.github.com/ - - run: npm ci + registry-url: https://registry.npmjs.org/ + - run: yarn install + - run: yarn build - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}