Skip to content

Commit e0b5a3f

Browse files
author
munja
committed
feat: automatic release pipeline
1 parent 848a07c commit e0b5a3f

File tree

2 files changed

+84
-5
lines changed

2 files changed

+84
-5
lines changed

.github/workflows/release.yml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,50 @@ on:
88
jobs:
99
release:
1010
runs-on: ubuntu-latest
11+
steps:
12+
13+
strategy:
14+
matrix:
15+
node-version: [lts/*]
16+
1117
steps:
1218
- name: Checkout
1319
uses: actions/checkout@v2
20+
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v2
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
1426
- name: Install dependencies
1527
run: npm ci
16-
- name: Build Project
17-
run: npm run build
18-
- name: Semantic Release
19-
uses: cycjimmy/semantic-release-action@v2
2028
env:
21-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
29+
CI: true
30+
31+
- name: Build Frontend
32+
run: npm run build
33+
34+
- name: create SAS 9 EBI build and Add to Release
35+
run: |
36+
npx sasjs cb -t sas9
37+
mkdir ./artefacts
38+
cp ./sasjsbuild/sas9.sas ./artefacts/sas9.sas
39+
40+
- name: create Viya build and Add to Release
41+
run: |
42+
npx sasjs cb -t viya
43+
cp ./sasjsbuild/viya.sas ./artefacts/viya.sas
44+
45+
- name: create SASjs build and Add to Release
46+
run: |
47+
npx sasjs cb -t server
48+
cp ./sasjsbuild/server.json.zip ./artefacts/server.json.zip
49+
50+
- name: Install Semantic Release and plugins
51+
run: |
52+
npm i
53+
npm i -g semantic-release
54+
55+
- name: Release
56+
run: |
57+
GITHUB_TOKEN=${{ secrets.GH_TOKEN }} semantic-release

.releaserc

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"branches": [
3+
"main"
4+
],
5+
"plugins": [
6+
"@semantic-release/commit-analyzer",
7+
"@semantic-release/release-notes-generator",
8+
"@semantic-release/changelog",
9+
[
10+
"@semantic-release/git",
11+
{
12+
"assets": [
13+
"CHANGELOG.md"
14+
]
15+
}
16+
],
17+
[
18+
"@semantic-release/github",
19+
{
20+
"assets": [
21+
{
22+
"path": "./artefacts/server.json.zip",
23+
"label": "SASjs Streamed App (Zip File)"
24+
},
25+
{
26+
"path": "./artefacts/sas9.sas",
27+
"label": "SAS 9 EBI Deployment (SAS Program)"
28+
},
29+
{
30+
"path": "./artefacts/viya.sas",
31+
"label": "Viya Deployment (SAS Program)"
32+
}
33+
]
34+
}
35+
],
36+
[
37+
"@semantic-release/exec",
38+
{
39+
"publishCmd": "echo 'publish command'"
40+
}
41+
]
42+
]
43+
}

0 commit comments

Comments
 (0)