From 462d9a1880005f32ccb65ab4e7666be3ba52de1a Mon Sep 17 00:00:00 2001 From: Stephen Yeargin Date: Sun, 27 Oct 2024 12:54:03 -0500 Subject: [PATCH 1/3] Publish to GitHub Packages --- .github/workflows/npm-publish.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index fa86838..dcfed63 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -12,15 +12,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 with: node-version: "20" + - run: npm ci + - run: npm test + - uses: JS-DevTools/npm-publish@v3 id: publish with: token: ${{ secrets.NPM_AUTH_TOKEN }} + - if: ${{ steps.publish.outputs.type }} name: Create Release env: @@ -28,3 +33,10 @@ jobs: run: | VERSION="v${{ steps.publish.outputs.version }}" gh release create $VERSION --generate-notes + + - if: ${{ steps.publish.outputs.type }} + name: Publish to GitHub Packages + env: + NODE_AUTH_TOKEN: ${{ github.token }} + run: | + npm publish --registry=https://npm.pkg.github.com/ From 9395a457a55454ffab3c56a32e01150408c46129 Mon Sep 17 00:00:00 2001 From: Stephen Yeargin Date: Sun, 27 Oct 2024 12:56:11 -0500 Subject: [PATCH 2/3] Use latest version of setup-node --- .github/workflows/npm-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index dcfed63..cb3cada 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: "20" From fc168a68f93b08edf17f6a6ea8bdb61ec9a71dc1 Mon Sep 17 00:00:00 2001 From: Stephen Yeargin Date: Sun, 27 Oct 2024 12:59:02 -0500 Subject: [PATCH 3/3] Missed a few --- .github/workflows/nodejs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index ea862c4..56b3d16 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -13,10 +13,10 @@ jobs: node-version: [16.x, 18.x, 20.x] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} @@ -32,4 +32,4 @@ jobs: npm test env: CI: true - +