diff --git a/.github/workflows/publish-tag.yml b/.github/workflows/publish-tag.yml index bf9075a49..89c709e00 100644 --- a/.github/workflows/publish-tag.yml +++ b/.github/workflows/publish-tag.yml @@ -1,14 +1,17 @@ -name: Release Pipeline +name: Publish custom tag on: # Allows triggering the workflow manually workflow_dispatch: inputs: - provider_version: + version: description: "Build and publish to NPM" - required: false - default: "v0.17.4-test.1" - + required: true + default: "3.9.0" + tag: + description: "Tag to apply to the release" + required: true + default: "test.1" # We're going to interact with GH from the pipelines, so we need to get some permissions permissions: @@ -33,34 +36,26 @@ jobs: uses: actions/setup-node@v4 with: # Semantic release requires this as bare minimum - node-version: 20 - - # Why this? https://github.com/npm/cli/issues/7279 - # Why this way? https://github.com/actions/setup-node/issues/213 - - name: Install latest npm - shell: bash - run: | - npm install -g npm@latest && - npm --version && - npm list -g --depth 0 + node-version: 24 - name: Install dependencies run: npm install - - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies - run: npm audit signatures + - name: Setup npm auth + run: | + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Set version to ${{ github.event.inputs.version }}-${{ github.event.inputs.tag }} + run: | + set -x + npm version ${{ github.event.inputs.version }}-${{ github.event.inputs.tag }} --no-git-tag-version - name: Build the SDK for release - run: npm run build + run: | + npm run build - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Publish to NPM - ${{ github.event.inputs.version }} run: | - npm version ${{ github.event.inputs.version }} --no-git-tag-version - npm build - npm publish - git tag v${{ github.event.inputs.version }} - git push - git push --tags + npm publish --tag ${{ github.event.inputs.tag }} diff --git a/.husky/commit-msg b/.husky/commit-msg old mode 100755 new mode 100644 diff --git a/.husky/pre-commit b/.husky/pre-commit old mode 100755 new mode 100644 diff --git a/package-lock.json b/package-lock.json index 26be81ec5..24926309f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@golem-sdk/golem-js", - "version": "0.8.0", + "version": "3.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@golem-sdk/golem-js", - "version": "0.8.0", + "version": "3.9.0", "license": "LGPL-3.0", "workspaces": [ "examples/" diff --git a/package.json b/package.json index 60e576414..998b75a87 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@golem-sdk/golem-js", - "version": "0.8.0", + "version": "3.9.0", "description": "NodeJS and WebBrowser SDK for building apps running on Golem Network", "repository": "https://github.com/golemfactory/golem-js", "keywords": [