Skip to content

Commit f186662

Browse files
author
mashal-m
committed
refactor: update ci file
1 parent 8d78b57 commit f186662

File tree

2 files changed

+42
-51
lines changed

2 files changed

+42
-51
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,16 @@ jobs:
4141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4242
run: npx semantic-release
4343
id: ver
44-
outputs:
45-
output1: ${{ steps.ver.outputs.nextVer }}
44+
ci:
45+
output1: ${{ steps.ver.ci.nextVer }}
4646

4747
print:
4848
needs: release
4949
runs-on: ubuntu-20.04
5050
steps:
5151
- name: Print version
52-
run: echo ${{ needs.release.outputs.output1 }}
52+
run: echo ${{ needs.release.ci.output1 }}
53+
- name: i18n_extract
54+
run: npm run i18n_extract
55+
- name: Coverage
56+
uses: codecov/codecov-action@v3

.github/workflows/release.yml

Lines changed: 35 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,41 @@
1-
name: Default CI
2-
1+
name: Release CI
32
on:
43
push:
54
branches:
6-
- master
7-
pull_request:
8-
branches:
9-
- '**'
10-
5+
- master
116
jobs:
12-
tests:
7+
release:
8+
name: Release
139
runs-on: ubuntu-latest
1410
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v3
17-
with:
18-
fetch-depth: 0
19-
- name: Setup Nodejs Env
20-
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
21-
- name: Setup Nodejs
22-
uses: actions/setup-node@v3
23-
with:
24-
node-version: ${{ env.NODE_VER }}
25-
- name: Install dependencies
26-
run: npm ci
27-
- name: Validate package-lock.json changes
28-
run: make validate-no-uncommitted-package-lock-changes
29-
- name: Lint
30-
run: npm run lint
31-
- name: Test
32-
run: npm run test
33-
- name: Build
34-
run: npm run build
35-
- name: i18n_extract
36-
run: npm run i18n_extract
37-
- name: Coverage
38-
uses: codecov/codecov-action@v3
39-
- name: Run semantic release
40-
id: ver
41-
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
run: npx semantic-release
44-
45-
print:
46-
needs: release
47-
runs-on: ubuntu-20.04
48-
steps:
49-
- name: Print version
50-
run: echo ${{ needs.release.outputs.output1 }}
51-
- name: i18n_extract
52-
run: npm run i18n_extract
53-
- name: Coverage
54-
uses: codecov/codecov-action@v3
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
- name: Setup Nodejs Env
16+
run: echo "NODE_VER=`cat .nvmrc`" >> $GITHUB_ENV
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: ${{ env.NODE_VER }}
21+
- name: Install dependencies
22+
run: npm ci
23+
- name: Validate package-lock.json changes
24+
run: make validate-no-uncommitted-package-lock-changes
25+
- name: Lint
26+
run: npm run lint
27+
- name: Test
28+
run: npm run test
29+
- name: i18n_extract
30+
run: npm run i18n_extract
31+
- name: Coverage
32+
uses: codecov/codecov-action@v3
33+
- name: Build
34+
run: npm run build
35+
- name: Release
36+
uses: cycjimmy/semantic-release-action@v3
37+
with:
38+
semantic_version: 16
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
41+
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}

0 commit comments

Comments
 (0)