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 1
1
name : Lint
2
2
3
- # Controls when the action will run.
4
3
on :
5
- # Triggers the workflow on pull request events but only for the main branch
6
4
pull_request :
7
5
branches : [main]
8
6
9
7
push :
10
8
branches : [main]
11
9
12
- merge_group :
13
-
14
- # Allows you to run this workflow manually from the Actions tab
15
10
workflow_dispatch :
16
11
17
- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
18
12
jobs :
19
13
lint :
20
- # The type of runner that the job will run on
21
14
runs-on : ubuntu-latest
22
15
23
- # Steps represent a sequence of tasks that will be executed as part of the job
24
16
steps :
25
17
- name : Checkout
26
18
uses : actions/checkout@v4
30
22
- name : Install Pnpm
31
23
run : corepack enable
32
24
33
- - name : Setup Node.js 18
25
+ - name : Setup Node.js
34
26
uses : actions/setup-node@v4
35
27
with :
36
28
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
3
3
on :
4
4
workflow_dispatch :
5
5
inputs :
6
- version :
6
+ npm_tag :
7
7
type : choice
8
- description : ' Release Version (next, beta, alpha, latest) '
8
+ description : ' Specify npm tag '
9
9
required : true
10
- default : ' next '
10
+ default : ' alpha '
11
11
options :
12
- - next
13
- - beta
14
12
- alpha
13
+ - beta
14
+ - rc
15
+ - canary
15
16
- latest
16
17
branch :
17
- description : ' Release Branch (confirm release branch) '
18
+ description : ' Branch to release'
18
19
required : true
19
20
default : ' main'
20
21
@@ -26,17 +27,18 @@ jobs:
26
27
name : Release
27
28
if : github.repository == 'web-infra-dev/rslib' && github.event_name == 'workflow_dispatch'
28
29
runs-on : ubuntu-latest
30
+ environment : production
29
31
steps :
30
32
- name : Checkout
31
33
uses : actions/checkout@v4
32
34
with :
33
- fetch-depth : 25
35
+ fetch-depth : 1
34
36
ref : ${{ github.event.inputs.branch }}
35
37
36
38
- name : Install Pnpm
37
39
run : corepack enable
38
40
39
- - name : Setup Node.js 18
41
+ - name : Setup Node.js
40
42
uses : actions/setup-node@v4
41
43
with :
42
44
node-version : 18
45
47
- name : Install Dependencies
46
48
run : pnpm install
47
49
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
55
51
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 1
1
name : Test
2
2
3
- # Controls when the action will run.
4
3
on :
5
- # Triggers the workflow on pull request events but only for the main branch
6
4
pull_request :
7
5
branches : [main]
8
6
9
7
push :
10
8
branches : [main]
11
9
12
- merge_group :
13
-
14
- # Allows you to run this workflow manually from the Actions tab
15
10
workflow_dispatch :
16
11
17
- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
18
12
jobs :
19
13
# ======== calculate changes ========
20
14
changes :
25
19
matrix :
26
20
node-version : [18]
27
21
28
- # Steps represent a sequence of tasks that will be executed as part of the job
29
22
steps :
30
23
- name : Checkout
31
24
uses : actions/checkout@v4
35
28
- name : Install Pnpm
36
29
run : corepack enable
37
30
38
- - uses : dorny/paths-filter@v3
31
+ - uses : dorny/paths-filter@v3.0.2
39
32
id : changes
40
33
with :
41
34
predicate-quantifier : ' every'
59
52
- node-version : 18
60
53
os : windows-latest
61
54
62
- # Steps represent a sequence of tasks that will be executed as part of the job
63
55
steps :
64
56
- name : Checkout
65
57
uses : actions/checkout@v4
100
92
- node-version : 18
101
93
os : windows-latest
102
94
103
- # Steps represent a sequence of tasks that will be executed as part of the job
104
95
steps :
105
96
- name : Git config
106
97
if : ${{ matrix.os == 'windows-latest' }}
@@ -141,7 +132,6 @@ jobs:
141
132
matrix :
142
133
node-version : [20]
143
134
144
- # Steps represent a sequence of tasks that will be executed as part of the job
145
135
steps :
146
136
- name : Checkout
147
137
uses : actions/checkout@v4
You can’t perform that action at this time.
0 commit comments