Skip to content

Commit 0f40409

Browse files
author
munja
committed
feat: automated release pipeline
1 parent b5d9c6a commit 0f40409

File tree

6 files changed

+1026
-149
lines changed

6 files changed

+1026
-149
lines changed

.github/build.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Push SASjs Deployment Assets
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [lts/*]
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v2
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Install dependencies
26+
run: npm install
27+
env:
28+
CI: true
29+
30+
- name: Check code style
31+
run: npm run lint
32+
33+
- name: Build Project
34+
run: npm run build
35+
36+
- name: create SAS 9 EBI build and Add to Release
37+
run: |
38+
npx sasjs cb -t sas9
39+
mkdir ./artefacts
40+
cp ./sasjsbuild/sas9.sas ./artefacts/sas9.sas
41+
42+
- name: create Viya build and Add to Release
43+
run: |
44+
npx sasjs cb -t viya
45+
cp ./sasjsbuild/viya.sas ./artefacts/viya.sas
46+
47+
- name: create SASjs build and Add to Release
48+
run: |
49+
npx sasjs cb -t server
50+
cp ./sasjsbuild/server.json.zip ./artefacts/server.json.zip
51+
52+
- name: Install Semantic Release and plugins
53+
run: |
54+
npm i
55+
npm i -g semantic-release
56+
- name: Release
57+
run: |
58+
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 Server (Load to App Stream)"
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)