@@ -19,26 +19,29 @@ defaults:
1919 run :
2020 working-directory : packages/gearhash-wasm
2121
22+ permissions :
23+ contents : write
24+ id-token : write
25+ packages : write
26+
2227jobs :
2328 version_and_release :
2429 runs-on : ubuntu-latest
2530 steps :
26- - uses : actions/checkout@v3
31+ - uses : actions/checkout@v5
2732 with :
2833 # Needed to push the tag and the commit on the main branch, otherwise we get:
2934 # > Run git push --follow-tags
3035 # remote: error: GH006: Protected branch update failed for refs/heads/main.
3136 # remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
3237 token : ${{ secrets.BOT_ACCESS_TOKEN }}
3338 - run : npm install -g corepack@latest && corepack enable
34- - uses : actions/setup-node@v3
39+ - uses : actions/setup-node@v4
3540 with :
36- node-version : " 20 "
41+ node-version : " 24 "
3742 cache : " pnpm"
3843 cache-dependency-path : |
3944 packages/gearhash-wasm/pnpm-lock.yaml
40- # setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
41- registry-url : " https://registry.npmjs.org"
4245 - run : pnpm install
4346 - run : git config --global user.name machineuser
4447 - run : git config --global user.email infra+machineuser@huggingface.co
@@ -49,16 +52,16 @@ jobs:
4952 node -e "const fs = require('fs'); const package = JSON.parse(fs.readFileSync('./package.json')); package.version = '$BUMPED_VERSION'; fs.writeFileSync('./package.json', JSON.stringify(package, null, '\t') + '\n');"
5053 git commit . -m "🔖 @huggingface/gearhash-wasm $BUMPED_VERSION"
5154 git tag "gearhash-wasm-v$BUMPED_VERSION"
52- - run : pnpm publish --no-git-checks .
53- env :
54- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
55+
5556 - run : (git pull --rebase && git push --follow-tags) || (git pull --rebase && git push --follow-tags)
56- # hack - reuse actions/setup-node@v3 just to set a new registry
57- - uses : actions/setup-node@v3
57+
58+ - run : pnpm publish --no-git-checks .
59+ # hack - reuse actions/setup-node@v4 just to set a new registry
60+ - uses : actions/setup-node@v4
5861 with :
59- node-version : " 20 "
62+ node-version : " 24 "
6063 registry-url : " https://npm.pkg.github.com"
61- # Disable for now, until github supports PATs for writing github packages (https://github.com/github/roadmap/issues/558)
62- # - run: pnpm publish --no-git-checks .
63- # env:
64- # NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
65+ - run : pnpm publish --no-git-checks .
66+ env :
67+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments