From d79d8b0eb2d63fe23f8b77f65373bd92d5fc9091 Mon Sep 17 00:00:00 2001 From: Sortia <46825591+Sortia@users.noreply.github.com> Date: Thu, 21 Mar 2024 09:21:52 +0300 Subject: [PATCH 1/2] Create npm-publish-github-packages.yml --- .../workflows/npm-publish-github-packages.yml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/npm-publish-github-packages.yml diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml new file mode 100644 index 0000000..4006a76 --- /dev/null +++ b/.github/workflows/npm-publish-github-packages.yml @@ -0,0 +1,25 @@ +# 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: Node.js Package + +on: + release: + types: [created] + +jobs: + publish-gpr: + 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 + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From c5b5d37f49b2c81965b6710c6bfce1f33b48a8fd Mon Sep 17 00:00:00 2001 From: Sortia <46825591+Sortia@users.noreply.github.com> Date: Thu, 21 Mar 2024 09:30:00 +0300 Subject: [PATCH 2/2] Update npm-publish-github-packages.yml --- .github/workflows/npm-publish-github-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml index 4006a76..6253e9f 100644 --- a/.github/workflows/npm-publish-github-packages.yml +++ b/.github/workflows/npm-publish-github-packages.yml @@ -22,4 +22,4 @@ jobs: - run: npm ci - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}