File tree Expand file tree Collapse file tree 3 files changed +92
-2
lines changed
Expand file tree Collapse file tree 3 files changed +92
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Canary Releases
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ permissions :
9+ contents : read
10+ id-token : write # npm provenance (OIDC)
11+
12+ env :
13+ DO_NOT_TRACK : ' 1'
14+
15+ jobs :
16+ typescript-build :
17+ uses : ./.github/workflows/typescript-build.yml
18+
19+ typescript-test :
20+ uses : ./.github/workflows/typescript-test.yml
21+
22+ canary :
23+ name : Publish Canary
24+ runs-on : ubuntu-latest
25+ needs : [typescript-build, typescript-test]
26+ env :
27+ NPM_CONFIG_PROVENANCE : true
28+ steps :
29+ - name : Checkout
30+ uses : actions/checkout@v4
31+
32+ - name : Install Dependencies
33+ uses : ./.github/workflows/actions/install-dependencies
34+
35+ - name : Build
36+ run : pnpm build
37+
38+ - name : Version as canary snapshot
39+ run : pnpm changeset version --snapshot canary
40+ env :
41+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42+
43+ - name : Rebuild with canary version
44+ run : pnpm build
45+
46+ - name : Pack tarball
47+ run : |
48+ mkdir -p .npm-pack
49+ pnpm pack --pack-destination .npm-pack
50+ echo "Packed tarball:"
51+ ls -la .npm-pack/
52+
53+ - name : Publish canary to npm
54+ run : |
55+ TARBALL=$(ls .npm-pack/*.tgz | head -1)
56+ echo "Publishing ${TARBALL} with tag 'canary'..."
57+ npm publish "$TARBALL" --access public --tag canary
58+ echo "Published successfully"
59+ env :
60+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Version Packages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ permissions :
9+ contents : write
10+ pull-requests : write
11+
12+ jobs :
13+ version :
14+ name : Create Version PR
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+
20+ - name : Install Dependencies
21+ uses : ./.github/workflows/actions/install-dependencies
22+
23+ - name : Create Changesets Pull Request
24+ uses : changesets/action@v1
25+ with :
26+ title : ' chore: version packages'
27+ commit : ' chore: version packages'
28+ env :
29+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1515 type : boolean
1616
1717permissions :
18- contents : write # Push tags, create releases
19- id-token : write # npm provenance (OIDC)
18+ contents : write # Push tags, create releases
19+ id-token : write # npm provenance (OIDC)
20+ pull-requests : write # Comment on PRs
2021
2122# Prevent concurrent publishes
2223concurrency :
You can’t perform that action at this time.
0 commit comments