-
-
Notifications
You must be signed in to change notification settings - Fork 15
191 lines (189 loc) · 6.48 KB
/
central.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
name: Intiface Central Build
# Only build on tag pushes
on:
push:
# branches:
# - main
# - dev
# - ci
tags:
- 'v*'
jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- run: flutter config --enable-windows-desktop
name: flutter config
- run: flutter build windows --release --dart-define="SENTRY_DSN=${{ secrets.SENTRY_DSN }}"
name: flutter build
- uses: dlemstra/code-sign-action@v1
with:
certificate: '${{ secrets.NPLABS_WINDOWS_202205_CERT }}'
password: '${{ secrets.NPLABS_WINDOWS_202205_KEY }}'
folder: '.\build\windows\runner\Release'
recursive: false
files: |
intiface_central.exe
description: 'Sign Intiface Central Executable'
- name: Build Innosetup Installer
shell: pwsh
env:
BUILD_VERSION: ${{ github.ref_name }}
run: |
iscc .\intiface-central-installer.iss
- uses: dlemstra/code-sign-action@v1
with:
certificate: '${{ secrets.NPLABS_WINDOWS_202205_CERT }}'
password: '${{ secrets.NPLABS_WINDOWS_202205_KEY }}'
folder: '.\installer\'
recursive: false
files: |
intiface-central-installer.exe
description: 'Sign Intiface Central Installer'
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: windows-installer
path: |
installer/intiface-central-installer.exe
linux:
strategy:
matrix:
os: ["ubuntu-latest", "ubuntu-20.04"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libudev-dev libgtk-3-dev
- run: flutter config --enable-linux-desktop
name: flutter config
- run: flutter build linux --release --dart-define="SENTRY_DSN=${{ secrets.SENTRY_DSN }}"
name: flutter build
- name: Zip Release
run: zip -r intiface-central-linux-${{ matrix.os }}-x64.zip build/linux/x64/release/bundle
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: linux-${{ matrix.os }}-zip
path: ./intiface-central-linux-${{ matrix.os }}-x64.zip
# macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v3
# - name: rust toolchain
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# override: true
# - uses: subosito/flutter-action@v2
# with:
# channel: 'stable'
# cache: true
# cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
# - run: flutter config --enable-macos-desktop
# name: flutter config
# - run: flutter build macos --release --dart-define="SENTRY_DSN=${{ secrets.SENTRY_DSN }}"
# name: flutter build
# - name: Zip Release
# run: zip -r intiface-central-macos-universal.zip build/macos/Build/Products/Release/intiface_central.app
# - name: Archive production artifacts
# uses: actions/upload-artifact@v3
# with:
# name: macos-zip
# path: ./intiface-central-macos-universal.zip
# android:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-java@v2
# with:
# distribution: 'zulu'
# java-version: '17'
# - name: Setup NDK
# uses: nttld/setup-ndk@v1
# id: setup-ndk
# with:
# ndk-version: r25b
# local-cache: true
# - name: Restore keystore
# uses: timheuer/base64-to-file@v1.2
# with:
# fileName: 'key.properties'
# fileDir: './android'
# encodedString: ${{ secrets.NPLABS_ANDROID_PROPERTIES }}
# - name: Restore keystore
# uses: timheuer/base64-to-file@v1.2
# with:
# fileName: 'upload-keystore.jks'
# fileDir: './android/app'
# encodedString: ${{ secrets.NPLABS_ANDROID_STORE }}
# - name: rust toolchain
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# target: aarch64-linux-android
# toolchain: stable
# override: true
# - name: rust toolchain
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# target: armv7-linux-androideabi
# toolchain: stable
# override: true
# - name: Install cargo-make
# run: cargo install cargo-make
# - name: Build rust android library
# env:
# ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
# RANLIB: ${{ format('{0}{1}', steps.setup-ndk.outputs.ndk-path, '/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ranlib') }}
# run: cargo make build-android
# working-directory: intiface-engine-flutter-bridge
# - uses: subosito/flutter-action@v2
# with:
# channel: 'stable'
# cache: true
# cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
# - run: flutter config
# name: flutter config
# - run: flutter build apk --release --dart-define="SENTRY_DSN=${{ secrets.SENTRY_DSN }}"
# name: flutter build apk
# - run: flutter build appbundle
# name: flutter build appbundle --release --dart-define="SENTRY_DSN=${{ secrets.SENTRY_DSN }}"
# - name: Archive production artifacts (APK)
# uses: actions/upload-artifact@v3
# with:
# name: Android APK
# path: |
# build/app/outputs/flutter-apk/*.apk
# - name: Archive production artifacts (appbundle)
# uses: actions/upload-artifact@v3
# with:
# name: Android App Bundle
# path: |
# build/app/outputs/bundle/release/*.aab