Skip to content

Commit d39b93b

Browse files
committed
Add Github actions files
1 parent 616a979 commit d39b93b

File tree

7 files changed

+88
-52
lines changed

7 files changed

+88
-52
lines changed

.github/workflows/backend.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Backend Deploy
2+
3+
on:
4+
workflow_dispatch:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Java
14+
uses: actions/setup-java@v1
15+
with:
16+
java-version: 15
17+
- name: Deploy to Heroku
18+
run: cd backend && mvn heroku:deploy -Dmaven.test.skip
19+
env:
20+
HEROKU_API_KEY: ${{ secrets.HEROKU }}

.github/workflows/desktop.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build Desktop App
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: windows-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Java
14+
uses: actions/setup-java@v1
15+
with:
16+
java-version: 15
17+
18+
- name: Generate runtime
19+
run: cd desktop && jlink --output ./runtime/ --no-man-pages --no-header-files --add-modules java.base,java.desktop,java.sql,jdk.charsets,java.net.http,jdk.crypto.ec,java.logging --compress=2
20+
21+
- name: Copy libraries
22+
run: cd desktop && mvn dependency:copy-dependencies -DincludeScope=runtime -DoutputDirectory=resources
23+
24+
- name: Create jar
25+
run: cd desktop && mvn package && move target/TimeTable_Desktop-1.0.jar resources/TimeTable.jar
26+
27+
- name: Create installer
28+
run: cd desktop && jpackage --runtime-image runtime --input resources --main-class timetable.Main --main-jar TimeTable.jar --name TimeTable --vendor Degubi --description TimeTable --icon icon.ico --win-per-user-install --win-dir-chooser --win-shortcut
29+
30+
- name: Upload binary to release
31+
uses: svenstaro/upload-release-action@v2
32+
with:
33+
repo_token: ${{ secrets.GITHUB_TOKEN }}
34+
file: desktop/TimeTable-1.0.exe
35+
asset_name: TimeTable.exe
36+
tag: ${{ github.ref }}

.github/workflows/phone.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build Phone App
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: windows-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Java
14+
uses: actions/setup-java@v1
15+
with:
16+
java-version: 8
17+
18+
- name: Set up Flutter
19+
uses: subosito/flutter-action@v1
20+
21+
- name: Build app
22+
run: cd phone && flutter pub get && flutter build apk
23+
24+
- name: Upload binary to release
25+
uses: svenstaro/upload-release-action@v2
26+
with:
27+
repo_token: ${{ secrets.GITHUB_TOKEN }}
28+
file: phone/build/app/outputs/flutter-apk/app.apk
29+
asset_name: TimeTable.apk
30+
tag: ${{ github.ref }}

backend/TimeTable Backend Deploy.launch

-18
This file was deleted.

desktop/build.py

-32
This file was deleted.

phone/android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
}
66

77
dependencies {
8-
classpath 'com.android.tools.build:gradle:4.0.1'
8+
classpath 'com.android.tools.build:gradle:3.5.0'
99
}
1010
}
1111

phone/android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip

0 commit comments

Comments
 (0)