-
Notifications
You must be signed in to change notification settings - Fork 1
91 lines (69 loc) · 1.96 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Release
on:
push:
branches: ["main"]
jobs:
build-server:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
defaults:
run:
shell: bash
working-directory: ./server
steps:
- uses: rui314/setup-mold@v1
- uses: actions/checkout@v3
- name: 🌱 - Install dependencies
run: sudo apt-get update; sudo apt-get install -y libudev-dev libsystemd-dev libusb-1.0-0-dev
- name: 🔨 - Build
run: cargo build --release
- name: 📦 - Copy artifact
uses: actions/upload-artifact@v3
with:
name: rusty_controller
path: server/target/release/rusty_controller
build-app:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ./app
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: 🌱 - Get dependencies
run: flutter pub get
- name: 🔨 - Build Apk
run: flutter build apk
- run: mv build/app/outputs/flutter-apk/app-release.apk ../RustyController.apk
- name: 📦 - Copy artifact
uses: actions/upload-artifact@v3
with:
name: RustyController.apk
path: RustyController.apk
upload:
needs: [build-server, build-app]
runs-on: ubuntu-latest
steps:
- name: 📦 - Copy server artifact
uses: actions/download-artifact@v3
with:
name: rusty_controller
- name: 📦 - Copy app artifact
uses: actions/download-artifact@v3
with:
name: RustyController.apk
- name: 🌠 - Release
uses: ncipollo/[email protected]
with:
artifacts: "rusty_controller,RustyController.apk"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
removeArtifacts: true
artifactErrorsFailBuild: true
prerelease: true
name: Latest Pre-release
tag: latest