Skip to content

Commit

Permalink
ci: migrate deploys to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
JaCzekanski committed Dec 21, 2020
1 parent e392943 commit 40e93cd
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 57 deletions.
16 changes: 6 additions & 10 deletions .ci/android/run-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,18 @@

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

if [ "$GITHUB_ACTIONS" = "true" ]; then
export BUILD_MODE="debug"
fi

mkdir -p "$HOME/.ccache"

docker run \
-e CI=$CI \
-e BUILD_MODE=$BUILD_MODE \
-e keystore_password="$keystore_password" \
-v $(pwd):/home/build \
-e CI="$CI" \
-e BUILD_MODE="$BUILD_MODE" \
-e KEYSTORE_PASSWORD="$KEYSTORE_PASSWORD" \
-v "$(pwd)":/home/build \
-v "$HOME/.ccache":/root/.ccache \
avocadoemu/android \
/bin/bash -ex /home/build/.ci/android/build.sh
2 changes: 1 addition & 1 deletion .ci/linux/run-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mkdir -p "$HOME/.ccache"

docker run \
-e CI=$CI \
-v $(pwd):/home/build \
-v "$(pwd)":/home/build \
-v "$HOME/.ccache":/root/.ccache \
avocadoemu/linux-clang$CLANG_VERSION \
/bin/bash -ex /home/build/.ci/linux/build.sh
63 changes: 53 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ jobs:

- name: Build
run: .ci/linux/run-container.sh 6

- name: Notify Discord (success)
if: success()
run: .ci/notify-discord.sh success ${{ secrets.WEBHOOK_URL }}

- name: Notify Discord (failure)
if: failure()
run: .ci/notify-discord.sh failure ${{ secrets.WEBHOOK_URL }}

linux_clang8:
name: "Linux Clang8"
Expand All @@ -41,11 +49,22 @@ jobs:
- name: Build
run: .ci/linux/run-container.sh 8

- name: Upload
- name: Upload Github
uses: kittaakos/upload-artifact-as-is@v0
with:
path: upload/


- name: Upload Builds
run: .ci/deploy.sh $DEPLOY_KEY upload/*

- name: Notify Discord (success)
if: success()
run: .ci/notify-discord.sh success ${{ secrets.WEBHOOK_URL }}

- name: Notify Discord (failure)
if: failure()
run: .ci/notify-discord.sh failure ${{ secrets.WEBHOOK_URL }}

android:
name: "Android"
runs-on: ubuntu-18.04
Expand All @@ -64,15 +83,29 @@ jobs:

- name: Build
run: .ci/android/run-container.sh
env:
KEYSTORE_KEY: ${{ secrets.KEYSTORE_KEY }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}

- name: Upload
- name: Upload Github
uses: kittaakos/upload-artifact-as-is@v0
with:
with:
path: upload/


- name: Upload Builds
run: .ci/deploy.sh $DEPLOY_KEY upload/*

- name: Notify Discord (success)
if: success()
run: .ci/notify-discord.sh success ${{ secrets.WEBHOOK_URL }}

- name: Notify Discord (failure)
if: failure()
run: .ci/notify-discord.sh failure ${{ secrets.WEBHOOK_URL }}

macos:
name: "macOS"
runs-on: macOS-10.15
runs-on: macOS-10.14
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -91,10 +124,20 @@ jobs:

- name: Build
run: .ci/macos/build.sh
- name: Upload

- name: Upload Github
uses: kittaakos/upload-artifact-as-is@v0
with:
with:
path: upload/


- name: Upload Builds
run: .ci/deploy.sh $DEPLOY_KEY upload/*

- name: Notify Discord (success)
if: success()
run: .ci/notify-discord.sh success ${{ secrets.WEBHOOK_URL }}

- name: Notify Discord (failure)
if: failure()
run: .ci/notify-discord.sh failure ${{ secrets.WEBHOOK_URL }}
# TODO: Add Windows
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.application'

def signingPassword = System.getenv("keystore_password")
def signingPassword = System.getenv("KEYSTORE_PASSWORD")
def signingEnabled = signingPassword != null
println "App signing: $signingEnabled"

Expand Down
Binary file removed android/avocado.keystore.enc
Binary file not shown.
Binary file added android/avocado.keystore.gpg
Binary file not shown.
35 changes: 0 additions & 35 deletions main.yml

This file was deleted.

0 comments on commit 40e93cd

Please sign in to comment.