File tree Expand file tree Collapse file tree 4 files changed +74
-26
lines changed Expand file tree Collapse file tree 4 files changed +74
-26
lines changed Original file line number Diff line number Diff line change 1+ name : Setup
2+
3+ description : Setup tools and prepare environment
4+
5+ runs :
6+ using : composite
7+ steps :
8+ - name : Setup pnpm
9+ uses : pnpm/action-setup@v4
10+
11+ - name : Setup Nodejs
12+ uses : actions/setup-node@v4
13+ with :
14+ registry-url : https://registry.npmjs.org/
15+ node-version-file : .tool-versions
16+
17+ - name : Get pnpm store directory
18+ shell : bash
19+ run : |
20+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
21+
22+ - name : Setup pnpm cache
23+ uses : actions/cache@v4
24+ with :
25+ path : ${{ env.STORE_PATH }}
26+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
27+ restore-keys : |
28+ ${{ runner.os }}-pnpm-store-
29+
30+ - name : Install dependencies
31+ shell : bash
32+ run : pnpm install --frozen-lockfile
Original file line number Diff line number Diff line change 1+ name : Release Preview
2+
3+ on :
4+ pull_request :
5+ workflow_dispatch :
6+
7+ concurrency :
8+ group : ${{ github.workflow }}-${{ github.event.number || github.ref }}
9+ cancel-in-progress : true
10+
11+ permissions :
12+ contents : write
13+
14+ jobs :
15+ publish-pkg-pr-new :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Checkout
19+ uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 0
22+
23+ - name : Setup
24+ uses : ./.github/actions/setup
25+
26+ - name : Build packages
27+ run : pnpm run build
28+
29+ - name : Publish to pkg.pr.new
30+ run : pnpx pkg-pr-new publish --pnpm
Original file line number Diff line number Diff line change @@ -12,22 +12,13 @@ jobs:
1212 publish-npm :
1313 runs-on : ubuntu-latest
1414 steps :
15- - uses : actions/checkout@v4
15+ - name : Checkout
16+ uses : actions/checkout@v4
1617 with :
1718 fetch-depth : 0
1819
19- - name : Setup pnpm
20- uses : pnpm/action-setup@v2
21-
22- - name : Setup Nodejs
23- uses : actions/setup-node@v4
24- with :
25- cache : pnpm
26- registry-url : https://registry.npmjs.org/
27- node-version-file : .tool-versions
28-
29- - name : Install Dependencies
30- run : pnpm i
20+ - name : Setup
21+ uses : ./.github/actions/setup
3122
3223 - name : Build dist
3324 run : pnpm run build
Original file line number Diff line number Diff line change 99 branches :
1010 - main
1111
12+ concurrency :
13+ group : ${{ github.workflow }}-${{ github.event.number || github.ref }}
14+ cancel-in-progress : true
15+
1216jobs :
1317 test :
1418 runs-on : ubuntu-latest
1519 steps :
16- - uses : actions/checkout@v4
20+ - name : Checkout
21+ uses : actions/checkout@v4
1722 with :
1823 fetch-depth : 0
1924
20- - name : Setup pnpm
21- uses : pnpm/action-setup@v2
22-
23- - name : Setup Nodejs
24- uses : actions/setup-node@v4
25- with :
26- cache : pnpm
27- registry-url : https://registry.npmjs.org/
28- node-version-file : .tool-versions
29-
30- - name : Install Dependencies
31- run : pnpm i
25+ - name : Setup
26+ uses : ./.github/actions/setup
3227
3328 - name : Run Test
3429 run : pnpm run test
You can’t perform that action at this time.
0 commit comments