forked from gyroflow/gyroflow
-
Notifications
You must be signed in to change notification settings - Fork 0
171 lines (153 loc) · 6.84 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
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
name: Release
on:
push:
jobs:
build:
strategy:
fail-fast: false
matrix:
targets: [
{ os: ubuntu-latest, type: linux },
{ os: macos-latest, type: macos },
{ os: windows-2022, type: windows },
{ os: macos-latest, type: ios },
{ os: windows-2022, type: android }
]
name: Gyroflow for ${{ matrix.targets.type }}
runs-on: ${{ matrix.targets.os }}
env:
BUILD_APP_STORE_BUNDLE: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.targets.type }}-gyroflow-3
- name: Dependencies cache
id: extcache
uses: actions/cache@v3
with:
path: '${{ github.workspace }}/ext/'
key: ${{ matrix.targets.type }}-gyroflow-ext-3
- name: Prepare Vulkan SDK
uses: humbletim/[email protected]
with:
vulkan-query-version: 1.3.204.0
vulkan-components: Vulkan-Headers
vulkan-use-cache: true
- name: Force qml-video-rs rebuild (UNIX)
if: ${{ matrix.targets.os != 'windows-2022' }}
run: |
rm -rf ${{ github.workspace }}/target/*/deploy/build/qml-video-rs*
rm -rf ${{ github.workspace }}/target/deploy/build/qml-video-rs*
- name: Force qml-video-rs rebuild (Win)
if: ${{ matrix.targets.os == 'windows-2022' }}
run: |
rm -r -force ${{ github.workspace }}/target/deploy/build/qml-video-rs* -ErrorAction SilentlyContinue
rm -r -force ${{ github.workspace }}/target/release/build/qml-video-rs* -ErrorAction SilentlyContinue
- name: Install Mac certificate
if: ${{ matrix.targets.os == 'macos-latest' }}
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ matrix.targets.type == 'ios' && secrets.MAC_APPSTORE_CERTIFICATE || secrets.MACOS_CERTIFICATE }}
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
- name: Download Provisioning Profiles
if: ${{ matrix.targets.type == 'ios' }}
id: provisioning
uses: apple-actions/download-provisioning-profiles@v2
with:
bundle-id: 'xyz.gyroflow'
profile-type: 'IOS_APP_STORE'
issuer-id: ${{ secrets.MACOS_ITCONNECT_ISSUER }}
api-key-id: ${{ secrets.MACOS_ITCONNECT_KEY_ID }}
api-private-key: ${{ secrets.MACOS_ITCONNECT_KEY }}
- name: Save keystore to file
if: ${{ matrix.targets.os == 'windows-2022' }}
run: |
echo "${{ secrets.ANDROID_RELEASE_KEYSTORE }}" > ${{ github.workspace }}/android_release.keystore.b64
echo "${{ secrets.MS_STORE_SIGNING_KEY }}" > ${{ github.workspace }}/_deployment/windows/msix_signing_key.pfx.b64
certutil -decode ${{ github.workspace }}/android_release.keystore.b64 ${{ github.workspace }}/android_release.keystore
certutil -decode ${{ github.workspace }}/_deployment/windows/msix_signing_key.pfx.b64 ${{ github.workspace }}/_deployment/windows/msix_signing_key.pfx
- uses: extractions/setup-just@v1
- name: Build Gyroflow (macOS)
if: ${{ matrix.targets.type == 'macos' }}
env:
SIGNING_FINGERPRINT: ${{ secrets.MACOS_CERTIFICATE_FINGERPRINT }}
run: |
just install-deps
just deploy universal
xcrun notarytool submit --wait --apple-id ${{ secrets.MACOS_ACCOUNT_USER }} --team-id ${{ secrets.MACOS_TEAM }} --password ${{ secrets.MACOS_ACCOUNT_PASS }} ${{ github.workspace }}/_deployment/_binaries/Gyroflow-mac-universal.dmg
xcrun stapler staple --verbose ${{ github.workspace }}/_deployment/_binaries/Gyroflow-mac-universal.dmg
- name: Build Gyroflow (Linux)
if: ${{ matrix.targets.type == 'linux' }}
run: just deploy docker
- name: Build Gyroflow (Windows)
if: ${{ matrix.targets.type == 'windows' }}
env:
MS_STORE_SIGNING_PASS: ${{ secrets.MS_STORE_SIGNING_PASS }}
run: |
just install-deps
just deploy
if ("$Env:BUILD_APP_STORE_BUNDLE" -eq "true") { just bundle }
- name: Build Gyroflow (Android)
if: ${{ matrix.targets.type == 'android' }}
env:
KEY_STORE_PATH: ${{ github.workspace }}/android_release.keystore
KEY_STORE_ALIAS: ${{ secrets.ANDROID_RELEASE_KEYSTORE_ALIAS }}
KEY_STORE_PASS: ${{ secrets.ANDROID_RELEASE_KEYSTORE_PASS }}
BUILD_PROFILE: deploy
run: |
$Env:JAVA_HOME = $Env:JAVA_HOME_17_X64
just android install-deps
just android deploy
- name: Build Gyroflow (iOS)
if: ${{ matrix.targets.type == 'ios' }}
env:
SIGN_KEY: 7F82D6013B8F6D45F88FE547438744BD64750C5B
PROVISIONING_PROFILE: /Users/runner/Library/MobileDevice/Provisioning Profiles/${{ matrix.targets.type == 'ios' && fromJSON(steps.provisioning.outputs.profiles)[0].udid || '' }}.mobileprovision
run: |
just ios install-deps
just ios build-ipa
- name: Save debug symbols
if: ${{ matrix.targets.type == 'windows' }}
uses: actions/upload-artifact@v3
with:
name: Gyroflow-debug-symbols
path: |
${{ github.workspace }}/target/deploy/deps/gyroflow.pdb
${{ github.workspace }}/target/deploy/*.pdb
- name: Save Binaries
uses: actions/upload-artifact@v3
with:
name: Gyroflow-${{ matrix.targets.type }}
path: _deployment/_binaries/*.*
github_release:
name: Create GitHub release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- run: ls -l
- name: Publish
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./*
- name: Upload to App Store
if: startsWith(github.ref, 'refs/tags/')
run: xcrun altool --upload-app -f ${{ github.workspace }}/_deployment/_binaries/Gyroflow.ipa -t iOS -u ${{ secrets.MACOS_ACCOUNT_USER }} -p ${{ secrets.MACOS_ACCOUNT_PASS }}
- name: Upload to Google Play
uses: r0adkll/upload-google-play@v1
if: startsWith(github.ref, 'refs/tags/')
with:
serviceAccountJsonPlainText: ${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }}
packageName: xyz.gyroflow
releaseFiles: ${{ github.workspace }}/_deployment/_binaries/Gyroflow.aab
track: production
changesNotSentForReview: true