File tree Expand file tree Collapse file tree 1 file changed +11
-47
lines changed
Expand file tree Collapse file tree 1 file changed +11
-47
lines changed Original file line number Diff line number Diff line change 77
88jobs :
99 deploy :
10- runs-on : ubuntu-latest
11- steps :
12- - uses : actions/checkout@v4
13- - uses : actions/setup-node@v4
14- with :
15- registry-url : ' https://registry.npmjs.org'
16- node-version : 23
17- env :
18- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
19-
20- - name : Cache dependencies
21- id : cache-dependencies
22- uses : actions/cache@v4
23- with :
24- path : node_modules
25- key : node_modules-${{ hashFiles('**/package-lock.json') }}
26-
27- - name : Install dependencies
28- if : steps.cache-dependencies.outputs.cache-hit != 'true'
29- run : npm ci
30-
31- - name : Generate types
32- run : npm run graphql-codegen
33-
34- - name : Bump version
35- run : |-
36- sed -i -e "s~\"version\": \"0.0.0-dev\"~\"version\": \"${GITHUB_REF##*/}\"~" package.json
37-
38- - name : Build package
39- run : npm run build
40-
41- - name : Prepare release
42- run : |-
43- cp package.json LICENSE README.md build/
44- cd build
45-
46- - name : Publish pre-release to NPM
47- if : ${{ github.event.release.prerelease }}
48- run : |-
49- cd build
50- npm publish --tag next
51-
52- - name : Publish release to NPM
53- if : ${{ !github.event.release.prerelease }}
54- run : |-
55- cd build
56- npm publish
10+ uses : croct-tech/github-workflows/.github/workflows/general/publish-npm-package.yml@unify-workflows
11+ with :
12+ node-version : " 23"
13+ publish-access : " public"
14+ pre-build-script : >-
15+ npm run graphql-codegen &&
16+ sed -i -e "s~\"version\": \"0.0.0-dev\"~\"version\": \"${GITHUB_REF##*/}\"~" package.json
17+ prepare-script : >-
18+ cp package.json LICENSE README.md build/
19+ secrets :
20+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments