Skip to content

Commit 652f714

Browse files
authored
Merge pull request #35 from s-group-dev/beta
Add "beta" settings for publishing prerelease
2 parents e4641dd + 408e531 commit 652f714

File tree

5 files changed

+258
-246
lines changed

5 files changed

+258
-246
lines changed

.github/workflows/main.yml

Lines changed: 118 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,128 @@
11
name: Main Push
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
push:
5+
branches:
6+
- main
7+
- beta
78

89
jobs:
9-
Install:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v4
14-
with:
15-
node-version: 20
16-
- uses: actions/cache@v4
17-
id: cache-node_modules
18-
with:
19-
path: node_modules
20-
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
21-
restore-keys: |
22-
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
23-
- if: steps.cache-node_modules.outputs.cache-hit != 'true'
24-
run: npm ci
10+
Install:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version-file: .node-version
17+
- uses: actions/cache@v4
18+
id: cache-node_modules
19+
with:
20+
path: node_modules
21+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
22+
restore-keys: |
23+
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
24+
- if: steps.cache-node_modules.outputs.cache-hit != 'true'
25+
run: npm ci
2526

26-
Test:
27-
needs:
28-
- Install
29-
runs-on: ubuntu-latest
30-
steps:
31-
- uses: actions/checkout@v4
32-
- uses: actions/setup-node@v4
33-
with:
34-
node-version: 20
35-
- uses: actions/cache@v4
36-
id: cache-node_modules
37-
with:
38-
path: node_modules
39-
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
40-
restore-keys: |
41-
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
42-
- run: npm run test
27+
Test:
28+
needs:
29+
- Install
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-node@v4
34+
with:
35+
node-version-file: .node-version
36+
- uses: actions/cache@v4
37+
id: cache-node_modules
38+
with:
39+
path: node_modules
40+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
41+
restore-keys: |
42+
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
43+
- run: npm run test
4344

44-
Lint:
45-
needs:
46-
- Install
47-
runs-on: ubuntu-latest
48-
steps:
49-
- uses: actions/checkout@v4
50-
- uses: actions/setup-node@v4
51-
with:
52-
node-version: 20
53-
- uses: actions/cache@v4
54-
id: cache-node_modules
55-
with:
56-
path: node_modules
57-
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
58-
restore-keys: |
59-
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
60-
- run: npm run lint
45+
Lint:
46+
needs:
47+
- Install
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
- uses: actions/setup-node@v4
52+
with:
53+
node-version-file: .node-version
54+
- uses: actions/cache@v4
55+
id: cache-node_modules
56+
with:
57+
path: node_modules
58+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
59+
restore-keys: |
60+
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
61+
- run: npm run lint
6162

62-
Typecheck:
63-
needs:
64-
- Install
65-
runs-on: ubuntu-latest
66-
steps:
67-
- uses: actions/checkout@v4
68-
- uses: actions/setup-node@v4
69-
with:
70-
node-version: 20
71-
- uses: actions/cache@v4
72-
id: cache-node_modules
73-
with:
74-
path: node_modules
75-
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
76-
restore-keys: |
77-
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
78-
- run: npm run typecheck
63+
Typecheck:
64+
needs:
65+
- Install
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v4
69+
- uses: actions/setup-node@v4
70+
with:
71+
node-version-file: .node-version
72+
- uses: actions/cache@v4
73+
id: cache-node_modules
74+
with:
75+
path: node_modules
76+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
77+
restore-keys: |
78+
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
79+
- run: npm run typecheck
7980

80-
Build:
81-
needs:
82-
- Install
83-
runs-on: ubuntu-latest
84-
steps:
85-
- uses: actions/checkout@v4
86-
- uses: actions/setup-node@v4
87-
with:
88-
node-version: 20
89-
- uses: actions/cache@v4
90-
id: cache-node_modules
91-
with:
92-
path: node_modules
93-
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
94-
restore-keys: |
95-
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
96-
- run: npm run build
81+
Build:
82+
needs:
83+
- Install
84+
runs-on: ubuntu-latest
85+
steps:
86+
- uses: actions/checkout@v4
87+
- uses: actions/setup-node@v4
88+
with:
89+
node-version-file: .node-version
90+
- uses: actions/cache@v4
91+
id: cache-node_modules
92+
with:
93+
path: node_modules
94+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
95+
restore-keys: |
96+
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
97+
- run: npm run build
9798

98-
Release:
99-
# Prevent infinite release loop
100-
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release)') }}
101-
needs:
102-
- Lint
103-
- Typecheck
104-
- Build
105-
- Test
106-
runs-on: ubuntu-latest
107-
steps:
108-
- uses: actions/checkout@v4
109-
with:
110-
token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
111-
- uses: actions/setup-node@v4
112-
with:
113-
node-version: 20
114-
- uses: actions/cache@v4
115-
id: cache-node_modules
116-
with:
117-
path: node_modules
118-
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
119-
restore-keys: |
120-
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
121-
- run: npx semantic-release
122-
env:
123-
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
124-
GIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
125-
GIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
126-
GIT_GIT_COMMITTER_NAME_NAME: ${{ github.event.head_commit.committer.name }}
127-
GIT_GIT_COMMITTER_NAME_EMAIL: ${{ github.event.head_commit.committer.email }}
99+
Release:
100+
# Prevent infinite release loop
101+
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release)') }}
102+
needs:
103+
- Lint
104+
- Typecheck
105+
- Build
106+
- Test
107+
runs-on: ubuntu-latest
108+
steps:
109+
- uses: actions/checkout@v4
110+
with:
111+
token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
112+
- uses: actions/setup-node@v4
113+
with:
114+
node-version-file: .node-version
115+
- uses: actions/cache@v4
116+
id: cache-node_modules
117+
with:
118+
path: node_modules
119+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
120+
restore-keys: |
121+
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
122+
- run: npx semantic-release
123+
env:
124+
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
125+
GIT_AUTHOR_NAME: ${{ github.event.head_commit.author.name }}
126+
GIT_AUTHOR_EMAIL: ${{ github.event.head_commit.author.email }}
127+
GIT_GIT_COMMITTER_NAME_NAME: ${{ github.event.head_commit.committer.name }}
128+
GIT_GIT_COMMITTER_NAME_EMAIL: ${{ github.event.head_commit.committer.email }}

0 commit comments

Comments
 (0)