File tree Expand file tree Collapse file tree 2 files changed +33
-33
lines changed Expand file tree Collapse file tree 2 files changed +33
-33
lines changed Original file line number Diff line number Diff line change 1
- name : Release
1
+ name : Dry-Run Release
2
2
on :
3
- push :
4
- branches :
5
- - main
6
- pull_request : {}
3
+ pull_request :
7
4
8
5
jobs :
9
6
lint-commits :
10
7
name : Lint PR commits
11
8
runs-on : ubuntu-latest
12
- if : ${{ github.event_name == 'pull_request' }}
13
9
steps :
14
10
- uses : actions/checkout@v3
15
11
with :
19
15
test-release :
20
16
name : Dry-run semantic-release
21
17
runs-on : ubuntu-latest
22
- if : ${{ github.event_name == 'pull_request' }}
23
18
steps :
24
19
- name : Checkout
25
20
uses : actions/checkout@v3
48
43
# configuration from the CI environment by removing the variable that
49
44
# is used for CI detection.
50
45
run : unset GITHUB_ACTIONS && npx semantic-release --dry-run --ci false
51
-
52
- release :
53
- name : Run semantic release
54
- runs-on : ubuntu-latest
55
- if : ${{ github.ref == 'refs/heads/main' }}
56
- steps :
57
- - name : Checkout
58
- uses : actions/checkout@v3
59
- with :
60
- fetch-depth : 0
61
- token : ${{ secrets.RELEASE_TOKEN }}
62
- - name : Setup Node.js
63
- uses : actions/setup-node@v3
64
- with :
65
- node-version : 18
66
- - name : Cache Node packages
67
- uses : actions/cache@v3
68
- with :
69
- path : node_modules
70
- key : release-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
71
- - name : Install dependencies
72
- run : npm ci
73
- - name : Release
74
- env :
75
- GITHUB_TOKEN : ${{ secrets.RELEASE_TOKEN }}
76
- run : npx semantic-release
Original file line number Diff line number Diff line change
1
+ name : Release
2
+ on :
3
+ workflow_dispatch :
4
+ schedule :
5
+ - cron : ' 0 2 * * *' # run at 2 AM UTC
6
+
7
+ jobs :
8
+ release :
9
+ name : Run semantic release
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v3
14
+ with :
15
+ fetch-depth : 0
16
+ token : ${{ secrets.RELEASE_TOKEN }}
17
+ - name : Setup Node.js
18
+ uses : actions/setup-node@v3
19
+ with :
20
+ node-version : 18
21
+ - name : Cache Node packages
22
+ uses : actions/cache@v3
23
+ with :
24
+ path : node_modules
25
+ key : release-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
26
+ - name : Install dependencies
27
+ run : npm ci
28
+ - name : Release
29
+ env :
30
+ GITHUB_TOKEN : ${{ secrets.RELEASE_TOKEN }}
31
+ run : npx semantic-release
You can’t perform that action at this time.
0 commit comments