From 0c14e0f17d3ef1ef70efcf6611a08434afd3b1b9 Mon Sep 17 00:00:00 2001 From: Diogo Rodrigues Date: Tue, 23 Jul 2024 23:34:54 +0100 Subject: [PATCH] Push to NPM instead --- ...ease-to-github.yaml => release-fork-to-npm.yaml} | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) rename .github/workflows/{release-to-github.yaml => release-fork-to-npm.yaml} (91%) diff --git a/.github/workflows/release-to-github.yaml b/.github/workflows/release-fork-to-npm.yaml similarity index 91% rename from .github/workflows/release-to-github.yaml rename to .github/workflows/release-fork-to-npm.yaml index b0c71bf14..90427b902 100644 --- a/.github/workflows/release-to-github.yaml +++ b/.github/workflows/release-fork-to-npm.yaml @@ -1,4 +1,4 @@ -name: Release to GitHub +name: Release fork to NPM on: workflow_dispatch @@ -111,8 +111,8 @@ jobs: - name: Build working-directory: ${{ matrix.package }} run: | - jq '.name="@singlestore-labs/${{ matrix.package }}"' package.json --tab > tmp.$$.json && mv tmp.$$.json package.json - # jq '.publishConfig.registry="https://npm.pkg.github.com/"' package.json --tab > tmp.$$.json && mv tmp.$$.json package.json + jq '.name="@drodrigues4/${{ matrix.package }}"' package.json --tab > tmp.$$.json && mv tmp.$$.json package.json + jq '.version="0.32.1-${{ github.sha }}"' package.json --tab > tmp.$$.json && mv tmp.$$.json package.json jq 'del(.publishConfig.provenance)' package.json --tab > tmp.$$.json && mv tmp.$$.json package.json pnpm build @@ -158,15 +158,14 @@ jobs: working-directory: ${{ matrix.package }} shell: bash env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} run: | version=latest - echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc - echo "@singlestore-labs:registry=https://npm.pkg.github.com" >> .npmrc + echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc echo "Publishing ${{ matrix.package }}@$version" - npm run publish + npm publish package.tgz --access public echo "npm: \`+ ${{ matrix.package }}@$version\`" >> $GITHUB_STEP_SUMMARY