Skip to content

Commit 3cfab28

Browse files
committed
Fixes to publish custom tag
1 parent 52fd3c4 commit 3cfab28

File tree

3 files changed

+26
-31
lines changed

3 files changed

+26
-31
lines changed

.github/workflows/publish-tag.yml

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
name: Release Pipeline
1+
name: Publish custom tag
22

33
on:
44
# Allows triggering the workflow manually
55
workflow_dispatch:
66
inputs:
7-
provider_version:
7+
version:
88
description: "Build and publish to NPM"
9-
required: false
10-
default: "v0.17.4-test.1"
11-
9+
required: true
10+
default: "3.9.0"
11+
tag:
12+
description: "Tag to apply to the release"
13+
required: true
14+
default: "test.1"
1215

1316
# We're going to interact with GH from the pipelines, so we need to get some permissions
1417
permissions:
@@ -33,34 +36,26 @@ jobs:
3336
uses: actions/setup-node@v4
3437
with:
3538
# Semantic release requires this as bare minimum
36-
node-version: 20
37-
38-
# Why this? https://github.com/npm/cli/issues/7279
39-
# Why this way? https://github.com/actions/setup-node/issues/213
40-
- name: Install latest npm
41-
shell: bash
42-
run: |
43-
npm install -g npm@latest &&
44-
npm --version &&
45-
npm list -g --depth 0
39+
node-version: 24
4640

4741
- name: Install dependencies
4842
run: npm install
4943

50-
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
51-
run: npm audit signatures
44+
- name: Setup npm auth
45+
run: |
46+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
47+
env:
48+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
50+
- name: Set version to ${{ github.event.inputs.version }}-${{ github.event.inputs.tag }}
51+
run: |
52+
set -x
53+
npm version ${{ github.event.inputs.version }}-${{ github.event.inputs.tag }} --no-git-tag-version
5254
5355
- name: Build the SDK for release
54-
run: npm run build
56+
run: |
57+
npm run build
5558
56-
- name: Release
57-
env:
58-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
59+
- name: Publish to NPM - ${{ github.event.inputs.version }}
6060
run: |
61-
npm version ${{ github.event.inputs.version }} --no-git-tag-version
62-
npm build
63-
npm publish
64-
git tag v${{ github.event.inputs.version }}
65-
git push
66-
git push --tags
61+
npm publish --tag ${{ github.event.inputs.tag }}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@golem-sdk/golem-js",
3-
"version": "0.8.0",
3+
"version": "3.9.0",
44
"description": "NodeJS and WebBrowser SDK for building apps running on Golem Network",
55
"repository": "https://github.com/golemfactory/golem-js",
66
"keywords": [

0 commit comments

Comments
 (0)