Skip to content

Commit aff1512

Browse files
committed
Merge remote-tracking branch 'origin/feature/github_actions' into dev
2 parents 2c0b443 + cc4254c commit aff1512

File tree

3 files changed

+106
-7
lines changed

3 files changed

+106
-7
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build & Package
2+
3+
on: [push]
4+
5+
jobs:
6+
build-java:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- uses: actions/setup-java@v3
11+
with:
12+
distribution: 'corretto'
13+
java-version: '17'
14+
- name: Build with Maven
15+
run: mvn --batch-mode --update-snapshots -f SmartcardAuth/pom.xml package
16+
- uses: actions/upload-artifact@v3
17+
with:
18+
name: SmartcardAuth-Build
19+
path: SmartcardAuth/target/*.jar
20+
build-api:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Setup .NET Core SDK 6
25+
uses: actions/setup-dotnet@v3
26+
with:
27+
dotnet-version: '6.0.x'
28+
- name: Install dependencies
29+
run: dotnet restore API/eRS.API.sln
30+
- name: Build with dotnet
31+
run: dotnet publish API/eRS.API.sln -c Release -o API/out --no-restore
32+
- uses: actions/upload-artifact@v3
33+
with:
34+
name: API-Build
35+
path: API/out/*
36+
build-ui:
37+
runs-on: ubuntu-latest
38+
env:
39+
CI: false
40+
steps:
41+
- uses: actions/checkout@v3
42+
- name: Use Node.js 18
43+
uses: actions/setup-node@v3
44+
with:
45+
node-version: 18.15.0
46+
- run: npm --prefix Client install
47+
- run: npm run --prefix Client build --if-present
48+
- uses: actions/upload-artifact@v3
49+
with:
50+
name: Client-Build
51+
path: Client/build/*
52+
package-release:
53+
needs: [build-java, build-ui, build-api]
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v3
57+
- uses: actions/download-artifact@v3
58+
- name: Display structure of downloaded files
59+
run: ls -R
60+
- name: package release
61+
run: ./release.sh
62+
shell: bash
63+
- uses: actions/upload-artifact@v3
64+
with:
65+
name: ers-document-integration
66+
path: target/*.zip
67+
path: target/*.jar
68+
path: target/*.txt
69+
path: target/LICENSE
70+
release:
71+
if: startsWith(github.event.ref, 'refs/tags/v')
72+
needs: [package-release]
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/download-artifact@v3
76+
with:
77+
name: ers-document-integration
78+
- name: Display structure of downloaded files
79+
run: ls -R
80+
- name: Release
81+
uses: softprops/action-gh-release@v1
82+
with:
83+
files: |
84+
Release.txt
85+
LICENSE
86+
*.zip
87+
*.jar
88+
*.txt
89+
body_path: Release.txt
90+
draft: true
91+

Release.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
0.0.3 Release including:
2+
3+
- Changing file output folder format to YYYY-MM to allow better sorting
4+
- Removing DB name prefix to allow flexibility of schema naming
5+
- Github actions-based release process

release.sh

100644100755
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -x
44

5-
RELEASE_TAG=v0.0.2
5+
RELEASE_TAG=${1:-vSNAPSHOT}
66

77
rm -rf target
88

@@ -12,26 +12,29 @@ cd Integration
1212
zip ../target/Integration-$RELEASE_TAG.zip *
1313
cd -
1414

15-
cp SmartcardAuth/target/ers-user-auth-app-$RELEASE_TAG.jar target/
15+
cp SmartcardAuth-Build/ers-user-auth-app-$RELEASE_TAG.jar target/
1616

1717
mkdir target/WindowsServiceDeployment
1818

1919
cp SmartcardAuth/WindowsServiceDeployment/* target/WindowsServiceDeployment
20-
cp SmartcardAuth/target/ers-user-auth-app-$RELEASE_TAG.jar target/WindowsServiceDeployment
20+
cp SmartcardAuth-Build/ers-user-auth-app-$RELEASE_TAG.jar target/WindowsServiceDeployment
2121

2222
cd target/WindowsServiceDeployment
2323
zip ../WindowsServiceDeployment-$RELEASE_TAG.zip *
2424
cd -
2525

2626
mkdir target/DocumentReviewApplication
27-
cp -r Client/build/* target/DocumentReviewApplication/
27+
cp -r Client-Build/* target/DocumentReviewApplication/
2828
mkdir target/DocumentReviewApplication/app
29-
cp -r API/out/* target/DocumentReviewApplication/app
29+
cp -r API-Build/* target/DocumentReviewApplication/app
3030

3131
cd target/DocumentReviewApplication
3232
zip -r ../DocumentReviewApplication-$RELEASE_TAG.zip *
3333
cd -
3434

3535
cd SQL
3636
zip -r ../target/SQL-$RELEASE_TAG.zip *
37-
cd -
37+
cd -
38+
39+
cp Release.txt target
40+
cp LICENSE target

0 commit comments

Comments
 (0)