File tree Expand file tree Collapse file tree 5 files changed +17
-179
lines changed Expand file tree Collapse file tree 5 files changed +17
-179
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11name : Lint
22
3- # Controls when the action will run.
43on :
5- # Triggers the workflow on pull request events but only for the main branch
64 pull_request :
75 branches : [main]
86
97 push :
108 branches : [main]
119
12- merge_group :
13-
14- # Allows you to run this workflow manually from the Actions tab
1510 workflow_dispatch :
1611
17- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
1812jobs :
1913 lint :
20- # The type of runner that the job will run on
2114 runs-on : ubuntu-latest
2215
23- # Steps represent a sequence of tasks that will be executed as part of the job
2416 steps :
2517 - name : Checkout
2618 uses : actions/checkout@v4
3022 - name : Install Pnpm
3123 run : corepack enable
3224
33- - name : Setup Node.js 18
25+ - name : Setup Node.js
3426 uses : actions/setup-node@v4
3527 with :
3628 node-version : 18
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,18 +3,19 @@ name: Release
33on :
44 workflow_dispatch :
55 inputs :
6- version :
6+ npm_tag :
77 type : choice
8- description : ' Release Version (next, beta, alpha, latest) '
8+ description : ' Specify npm tag '
99 required : true
10- default : ' next '
10+ default : ' alpha '
1111 options :
12- - next
13- - beta
1412 - alpha
13+ - beta
14+ - rc
15+ - canary
1516 - latest
1617 branch :
17- description : ' Release Branch (confirm release branch) '
18+ description : ' Branch to release'
1819 required : true
1920 default : ' main'
2021
@@ -26,17 +27,18 @@ jobs:
2627 name : Release
2728 if : github.repository == 'web-infra-dev/rslib' && github.event_name == 'workflow_dispatch'
2829 runs-on : ubuntu-latest
30+ environment : production
2931 steps :
3032 - name : Checkout
3133 uses : actions/checkout@v4
3234 with :
33- fetch-depth : 25
35+ fetch-depth : 1
3436 ref : ${{ github.event.inputs.branch }}
3537
3638 - name : Install Pnpm
3739 run : corepack enable
3840
39- - name : Setup Node.js 18
41+ - name : Setup Node.js
4042 uses : actions/setup-node@v4
4143 with :
4244 node-version : 18
4547 - name : Install Dependencies
4648 run : pnpm install
4749
48- - name : Release
49- uses : web-infra-dev/actions@v2
50- with :
51- version : ${{ github.event.inputs.version }}
52- branch : ${{ github.event.inputs.branch }}
53- type : ' release'
54- tools : ' changeset'
50+ - name : Publish to npm
5551 env :
56- GITHUB_TOKEN : ${{ secrets.REPO_SCOPED_TOKEN }}
57- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
58- REPOSITORY : ${{ github.repository }}
59- REF : ${{ github.ref }}
52+ NPM_TOKEN : ${{ secrets.RSLIB_NPM_TOKEN }}
53+ run : |
54+ npm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}"
55+ pnpm -r publish --tag ${{ github.event.inputs.npm_tag }} --publish-branch ${{ github.event.inputs.branch }}
Original file line number Diff line number Diff line change 11name : Test
22
3- # Controls when the action will run.
43on :
5- # Triggers the workflow on pull request events but only for the main branch
64 pull_request :
75 branches : [main]
86
97 push :
108 branches : [main]
119
12- merge_group :
13-
14- # Allows you to run this workflow manually from the Actions tab
1510 workflow_dispatch :
1611
17- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
1812jobs :
1913 # ======== calculate changes ========
2014 changes :
2519 matrix :
2620 node-version : [18]
2721
28- # Steps represent a sequence of tasks that will be executed as part of the job
2922 steps :
3023 - name : Checkout
3124 uses : actions/checkout@v4
3528 - name : Install Pnpm
3629 run : corepack enable
3730
38- - uses : dorny/paths-filter@v3
31+ - uses : dorny/paths-filter@v3.0.2
3932 id : changes
4033 with :
4134 predicate-quantifier : ' every'
5952 - node-version : 18
6053 os : windows-latest
6154
62- # Steps represent a sequence of tasks that will be executed as part of the job
6355 steps :
6456 - name : Checkout
6557 uses : actions/checkout@v4
10092 - node-version : 18
10193 os : windows-latest
10294
103- # Steps represent a sequence of tasks that will be executed as part of the job
10495 steps :
10596 - name : Git config
10697 if : ${{ matrix.os == 'windows-latest' }}
@@ -141,7 +132,6 @@ jobs:
141132 matrix :
142133 node-version : [20]
143134
144- # Steps represent a sequence of tasks that will be executed as part of the job
145135 steps :
146136 - name : Checkout
147137 uses : actions/checkout@v4
You can’t perform that action at this time.
0 commit comments