File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,11 +15,6 @@ permissions:
1515jobs :
1616 build :
1717 runs-on : ubuntu-latest
18- strategy :
19- matrix :
20- node-version : [22.x]
21- # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
22-
2318 steps :
2419 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2520 with :
@@ -28,11 +23,11 @@ jobs:
2823 - name : Install pnpm
2924 uses : pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
3025
31- - name : Use Node.js ${{ matrix.node-version }}
26+ - name : Use Node.js
3227 uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
3328 with :
3429 registry-url : " https://registry.npmjs.org"
35- node-version : ${{ matrix.node-version }}
30+ node-version-file : ' .nvmrc '
3631 cache : " pnpm"
3732
3833 - run : pnpm install --frozen-lockfile
4237 - run : pnpm run ci-test
4338
4439 - run : pnpm run ci-lint
45-
46- - name : Publish documentation
47- if : github.ref == 'refs/heads/master'
48- run : |
49- git config user.name "github-actions[bot]"
50- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
51- git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
52- pnpm run publish:gh-pages
Original file line number Diff line number Diff line change 1+ name : publish
2+ on :
3+ push :
4+ tags :
5+ - ' v[0-9]+.[0-9]+.[0-9]+'
6+
7+ permissions :
8+ contents : read
9+ id-token : write
10+
11+ jobs :
12+ publish :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
16+ with :
17+ fetch-depth : 0
18+
19+ - name : Install pnpm
20+ uses : pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
21+
22+ - name : Use Node.js
23+ uses : actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
24+ with :
25+ registry-url : " https://registry.npmjs.org"
26+ node-version-file : ' .nvmrc'
27+ cache : " pnpm"
28+
29+ - name : Validate tag matches package.json
30+ run : |
31+ TAG_VERSION="${{ github.ref_name }}"
32+ PKG_VERSION=$(jq -r .version projects/ng-qrcode/package.json)
33+
34+ echo "Git tag version: $TAG_VERSION"
35+ echo "package.json version: $PKG_VERSION"
36+
37+ if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
38+ echo "ERROR: Git tag does not match package.json version"
39+ exit 1
40+ fi
41+
42+ - run : pnpm install --frozen-lockfile
43+
44+ - run : pnpm run build-for-publish
45+
46+ - name : Publish to npm
47+ working-directory : ./dist/ng-qrcode
48+ run : |
49+ pnpm publish
50+
51+ - name : Publish documentation
52+ run : |
53+ git config user.name "github-actions[bot]"
54+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
55+ git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
56+ pnpm run publish:gh-pages
Original file line number Diff line number Diff line change 1+ # 20.0.1 - 2025-10-26
2+ - Adopt trusted publishers (#121 )
3+ - Switch to ` pnpm ` and adopt a 1 week minimum release age for dependencies (#116 )
4+
15# 20.0.0 - 2025-05-31
26- Support Angular 20 (#115 )
37
Original file line number Diff line number Diff line change 1616 "url" : " https://github.com/mnahkies/ng-qrcode/issues"
1717 },
1818 "scripts" : {
19- "postinstall " : " husky" ,
19+ "prepare " : " husky" ,
2020 "clean" : " rm -rf ./dist ./coverage" ,
2121 "docs:generate" : " node ./scripts/generate-toc.mjs" ,
2222 "start" : " ng serve" ,
2323 "build" : " ng build --project ng-qrcode --configuration production" ,
24- "build-for-publish" : " ng build --project ng-qrcode --configuration production && cp ./README.md ./CHANGES.md ./LICENSE ./dist/ng-qrcode/ " ,
24+ "build-for-publish" : " ng build --project ng-qrcode --configuration production && pnpm run copy:docs " ,
2525 "build-demo-app" : " ng build --project=ng-qrcode-demo --configuration production --base-href '/ng-qrcode/'" ,
2626 "publish:gh-pages" : " pnpm run build-demo-app && pnpm exec gh-pages -d ./dist/ng-qrcode-demo/browser -b gh-pages --nojekyll" ,
2727 "test" : " ng test" ,
2828 "lint" : " ng lint" ,
29- "ci-pipeline" : " pnpm run clean && pnpm run ci-build && pnpm run ci-test && pnpm run ci-lint" ,
30- "postci-pipeline " : " cp ./README.md ./CHANGES.md ./LICENSE ./dist/ng-qrcode/" ,
29+ "ci-pipeline" : " pnpm run clean && pnpm run ci-build && pnpm run ci-test && pnpm run ci-lint && pnpm run copy:docs " ,
30+ "copy:docs " : " cp ./README.md ./CHANGES.md ./LICENSE ./dist/ng-qrcode/" ,
3131 "ci-build" : " ng build --project ng-qrcode --configuration production && ng build --project=ng-qrcode-demo --configuration production" ,
3232 "ci-test" : " ng test --code-coverage" ,
3333 "ci-lint" : " ng lint"
Original file line number Diff line number Diff line change 11minimumReleaseAge : 10080 # 7 days in minutes
22
3+ # GH actions doesn't checkout the branch
4+ gitChecks : false
Original file line number Diff line number Diff line change 11{
22 "name" : " ng-qrcode" ,
33 "description" : " Simple AOT compatible QR code generator for your Angular project." ,
4- "version" : " 20.0.0 " ,
4+ "version" : " 20.0.1 " ,
55 "license" : " MIT" ,
66 "author" : {
77 "name" : " Michael Nahkies" ,
You can’t perform that action at this time.
0 commit comments