1- name : Publish Packages to npm
1+ name : Publish to NPM
22
33on :
44 push :
55 tags :
66 - ' v*' # Run on any tag that starts with v (e.g., v1.0.0)
77
8+
9+ permissions :
10+ id-token : write # Required for OIDC
11+ contents : read
12+
813jobs :
914 publish :
1015 runs-on : ubuntu-latest
1520 - name : Setup Node.js
1621 uses : actions/setup-node@v4
1722 with :
18- node-version : ' 18'
19- registry-url : ' https://registry.npmjs.org/'
20- scope : ' @beekeeperstudio'
23+ node-version : ' 20'
24+ registry-url : ' https://registry.npmjs.org'
25+
26+ # Ensure npm 11.5.1 or later is installed
27+ - name : Update npm
28+ run : npm install -g npm@latest
2129
2230 - name : Get tag version
2331 id : get_version
3038 run : |
3139 yarn version --new-version $VERSION --no-git-tag-version
3240
33- - name : Build packages
41+ - name : Build package
3442 run : yarn build
3543
3644 - name : Check if beta version
4654
4755 - name : Publish package (beta)
4856 if : env.IS_BETA == 'true'
49- run : yarn publish --access public --non-interactive --tag beta
50- env :
51- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
57+ run : npm publish --access public --tag beta
5258
5359 - name : Publish package (stable)
5460 if : env.IS_BETA == 'false'
55- run : yarn publish --access public --non-interactive
56- env :
57- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
58-
59- # Create GitHub release for this version
60- - name : Create GitHub Release
61- uses : softprops/action-gh-release@v1
62- with :
63- name : Release ${{ env.VERSION }}
64- body : |
65- # Beekeeper Studio Plugin v${{ env.VERSION }}
66-
67- Published package:
68- - @beekeeperstudio/plugin@${{ env.VERSION }}
69- env :
70- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61+ run : npm publish --access public
0 commit comments