Skip to content

Commit 270f416

Browse files
author
mashal-m
committed
feat: config semantic release work around
1 parent 2543926 commit 270f416

File tree

3 files changed

+49
-29
lines changed

3 files changed

+49
-29
lines changed

.github/workflows/ci.yml

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

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
3838
semantic_version: 16
3939
env:
4040
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
41-
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}
41+
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_NPM_TOKEN }}

.releaserc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
"prepare": "@semantic-release/npm",
1616
"publish": [
1717
"@semantic-release/npm",
18+
"@semantic-release/exec",
1819
{
1920
"path": "@semantic-release/github",
2021
"assets": {
2122
"path": "dist/*"
22-
}
23+
},
24+
"publishCmd": "echo ::set-output name=nextVer::${nextRelease.version}"
2325
}
2426
],
2527
"success": [],
2628
"fail": []
27-
}
29+
}

0 commit comments

Comments
 (0)