Skip to content

Commit fc8b098

Browse files
committed
ci: migrate deploys to Github Actions
1 parent e392943 commit fc8b098

File tree

7 files changed

+58
-57
lines changed

7 files changed

+58
-57
lines changed

.ci/android/run-container.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,18 @@
33

44
# Setup signing
55
export BUILD_MODE="debug"
6-
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
7-
openssl aes-256-cbc -K $encrypted_7333c7dd5b15_key -iv $encrypted_7333c7dd5b15_iv -in android/avocado.keystore.enc -out android/avocado.keystore -d
6+
if [[ -n "$GITHUB_HEAD_REF" ]]; then
7+
gpg --quiet --yes --decrypt --passphrase="$KEYSTORE_KEY" --output android/avocado.keystore android/avocado.keystore.gpg
88
export BUILD_MODE="release"
99
fi
1010

11-
if [ "$GITHUB_ACTIONS" = "true" ]; then
12-
export BUILD_MODE="debug"
13-
fi
14-
1511
mkdir -p "$HOME/.ccache"
1612

1713
docker run \
18-
-e CI=$CI \
19-
-e BUILD_MODE=$BUILD_MODE \
20-
-e keystore_password="$keystore_password" \
21-
-v $(pwd):/home/build \
14+
-e CI="$CI" \
15+
-e BUILD_MODE="$BUILD_MODE" \
16+
-e KEYSTORE_PASSWORD="$KEYSTORE_PASSWORD" \
17+
-v "$(pwd)":/home/build \
2218
-v "$HOME/.ccache":/root/.ccache \
2319
avocadoemu/android \
2420
/bin/bash -ex /home/build/.ci/android/build.sh

.ci/linux/run-container.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mkdir -p "$HOME/.ccache"
77

88
docker run \
99
-e CI=$CI \
10-
-v $(pwd):/home/build \
10+
-v "$(pwd)":/home/build \
1111
-v "$HOME/.ccache":/root/.ccache \
1212
avocadoemu/linux-clang$CLANG_VERSION \
1313
/bin/bash -ex /home/build/.ci/linux/build.sh

.github/workflows/build.yml

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ jobs:
2121

2222
- name: Build
2323
run: .ci/linux/run-container.sh 6
24+
25+
- name: Notify Discord (success)
26+
if: success()
27+
run: .ci/notify-discord.sh success $WEBHOOK_URL
28+
29+
- name: Notify Discord (failure)
30+
if: failure()
31+
run: .ci/notify-discord.sh failure $WEBHOOK_URL
2432

2533
linux_clang8:
2634
name: "Linux Clang8"
@@ -41,11 +49,22 @@ jobs:
4149
- name: Build
4250
run: .ci/linux/run-container.sh 8
4351

44-
- name: Upload
52+
- name: Upload Github
4553
uses: kittaakos/upload-artifact-as-is@v0
4654
with:
4755
path: upload/
48-
56+
57+
- name: Upload Builds
58+
run: .ci/deploy.sh $DEPLOY_KEY upload/*
59+
60+
- name: Notify Discord (success)
61+
if: success()
62+
run: .ci/notify-discord.sh success $WEBHOOK_URL
63+
64+
- name: Notify Discord (failure)
65+
if: failure()
66+
run: .ci/notify-discord.sh failure $WEBHOOK_URL
67+
4968
android:
5069
name: "Android"
5170
runs-on: ubuntu-18.04
@@ -65,14 +84,25 @@ jobs:
6584
- name: Build
6685
run: .ci/android/run-container.sh
6786

68-
- name: Upload
87+
- name: Upload Github
6988
uses: kittaakos/upload-artifact-as-is@v0
70-
with:
89+
with:
7190
path: upload/
72-
91+
92+
- name: Upload Builds
93+
run: .ci/deploy.sh $DEPLOY_KEY upload/*
94+
95+
- name: Notify Discord (success)
96+
if: success()
97+
run: .ci/notify-discord.sh success $WEBHOOK_URL
98+
99+
- name: Notify Discord (failure)
100+
if: failure()
101+
run: .ci/notify-discord.sh failure $WEBHOOK_URL
102+
73103
macos:
74104
name: "macOS"
75-
runs-on: macOS-10.15
105+
runs-on: macOS-10.14
76106
steps:
77107
- name: Checkout
78108
uses: actions/checkout@v2
@@ -91,10 +121,20 @@ jobs:
91121

92122
- name: Build
93123
run: .ci/macos/build.sh
94-
95-
- name: Upload
124+
125+
- name: Upload Github
96126
uses: kittaakos/upload-artifact-as-is@v0
97-
with:
127+
with:
98128
path: upload/
99-
129+
130+
- name: Upload Builds
131+
run: .ci/deploy.sh $DEPLOY_KEY upload/*
132+
133+
- name: Notify Discord (success)
134+
if: success()
135+
run: .ci/notify-discord.sh success $WEBHOOK_URL
136+
137+
- name: Notify Discord (failure)
138+
if: failure()
139+
run: .ci/notify-discord.sh failure $WEBHOOK_URL
100140
# TODO: Add Windows

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.android.application'
22

3-
def signingPassword = System.getenv("keystore_password")
3+
def signingPassword = System.getenv("KEYSTORE_PASSWORD")
44
def signingEnabled = signingPassword != null
55
println "App signing: $signingEnabled"
66

android/avocado.keystore.enc

-2.05 KB
Binary file not shown.

android/avocado.keystore.gpg

2.11 KB
Binary file not shown.

main.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)