66 workflow_dispatch :
77 inputs :
88 version :
9- description : " Version to publish (e.g., 0.8.6). If not provided, uses git tag. "
9+ description : " Version to publish (e.g., 0.8.6)"
1010 required : false
1111 type : string
1212
@@ -18,48 +18,34 @@ jobs:
1818 id-token : write
1919
2020 steps :
21- - name : Checkout code
22- uses : actions/checkout@v4
21+ - uses : actions/checkout@v4
2322 with :
2423 submodules : recursive
2524
26- - name : Setup Node.js
27- uses : actions/setup-node@v4
25+ - uses : actions/setup-node@v4
2826 with :
2927 node-version : " 22"
3028
31- - name : Ensure Clean Environment
32- run : |
33- unset NODE_AUTH_TOKEN
34- unset NPM_TOKEN
35- npm config set @crispthinking:registry https://registry.npmjs.org
29+ - name : Configure Registry
30+ run : npm config set @crispthinking:registry https://registry.npmjs.org
3631
37- - name : Set version from tag or input
32+ - name : Set version
3833 run : |
3934 if [[ -n "${{ inputs.version }}" ]]; then
40- INPUT_VERSION="${{ inputs.version }}"
41- VERSION=${INPUT_VERSION#v}
42- echo "Using version from workflow input: $VERSION"
35+ VERSION=${{ inputs.version }}
36+ VERSION=${VERSION#v}
4337 elif [[ "$GITHUB_REF" == refs/tags/* ]]; then
4438 TAG_VERSION=${GITHUB_REF#refs/tags/}
4539 VERSION=${TAG_VERSION#v}
46- echo "Using version from git tag: $VERSION"
4740 else
4841 VERSION="0.0.0"
4942 fi
50-
51- echo "Setting version to: $VERSION"
52- npm --no-git-tag-version version "$VERSION" || exit 1
5343 echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV
44+ npm --no-git-tag-version version "$VERSION"
5445
55- - name : Install dependencies
56- run : npm ci
57-
58- - name : Build
59- run : |
60- echo "Building version: $PACKAGE_VERSION"
61- npm run codegen
62- npm run build:release
46+ - run : npm ci
47+ - run : npm run codegen
48+ - run : npm run build:release
6349
64- - name : Publish to NPM
50+ - name : Publish
6551 run : npm publish --provenance --access public
0 commit comments