File tree Expand file tree Collapse file tree 4 files changed +62
-5
lines changed
v1/typescript-definitions Expand file tree Collapse file tree 4 files changed +62
-5
lines changed Original file line number Diff line number Diff line change 1- name : Publish to NPM
1+ name : Publish nightly to NPM
22
33on :
44 # Allows you to run this workflow manually from the Actions tab
1313 name : Publish to NPM
1414 runs-on : ubuntu-latest
1515 timeout-minutes : 15
16+ defaults :
17+ run :
18+ working-directory : ./v1/typescript-definitions
19+ steps :
20+ - uses : actions/checkout@v5
21+ - uses : actions/setup-node@v5
22+ with :
23+ node-version : 24
24+ package-manager-cache : false
25+ registry-url : " https://registry.npmjs.org"
26+
27+ # Ensure npm 11.5.1 or later is installed:
28+ # - name: Update npm
29+ # run: npm install -g npm@latest
30+
31+ - name : Prepare Environment
32+ # Install from package-lock.json:
33+ run : npm ci
34+ env :
35+ CI : true
36+
37+ - name : Get the Prerelease tag
38+ id : prerelease-tag
39+ uses : yuya-takeyama/docker-tag-from-github-ref-action@2b0614b1338c8f19dd9d3ea433ca9bc0cc7057ba
40+ with :
41+ remove-version-tag-prefix : false
42+
43+ - name : Bump version to prerelease
44+ run : |
45+ PRERELEASE_TAG=nightly-$(echo "${{ steps.prerelease-tag.outputs.tag }}" | sed -r 's/[^a-z0-9]+/-/gi')
46+ npm version prerelease --preid $PRERELEASE_TAG-$COMMIT_DATE-$GIT_HASH
47+
48+ - name : Generate types
49+ run : npm run generate-types
50+ env :
51+ CI : true
52+
53+ - name : Build
54+ run : npm run build
55+ env :
56+ CI : true
57+
58+ - name : Publish to NPM
59+ run : npm publish --tag nightly
60+ env :
61+ CI : true
Original file line number Diff line number Diff line change @@ -71,3 +71,15 @@ npm run build
7171npm run watch
7272
7373```
74+
75+ ### Publish to NPM
76+
77+ To publish a new version to NPM:
78+
79+ 1 . Bump the version ` npm version major|minor|patch `
80+ 2 . Commit and push to GitHub
81+ 3 . Go to the Actions tab and trigger the "Publish to NPM" workflow
82+
83+ To publish a nightly build to NPM:
84+
85+ 1 . Go to the Actions tab and trigger the "Publish nightly to NPM" workflow
Original file line number Diff line number Diff line change 1717 "scripts" : {
1818 "build" : " tsc --build" ,
1919 "watch" : " tsc --watch" ,
20- "generate-types" : " node scripts/generate-types.js" ,
21- "do:publish" : " npm run generate-types && npm run build && npm publish --access public"
20+ "generate-types" : " node scripts/generate-types.js"
2221 },
2322 "devDependencies" : {
2423 "typescript" : " ^5.6.3" ,
You can’t perform that action at this time.
0 commit comments