Merge pull request #255 from HelloVolla/dev #339
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Volla Launcher | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: a12e/docker-qt:5.13-android_arm64_v8a | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: Build Apk | |
env: | |
ANDROID_KEYSTORE_FILE_CONTENTS: ${{ secrets.ANDROID_KEYSTORE_FILE_CONTENTS }} | |
ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }} | |
ANDROID_KEYSTORE_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }} | |
run: | | |
export CACHE_DIR=build/cache | |
export M2_HOME=`realpath -m $CACHE_DIR/.m2` | |
export MAVEN_HOME=`realpath -m $CACHE_DIR/.m2` | |
export GRADLE_USER_HOME=`realpath -m $CACHE_DIR/.gradle` | |
export VERSION=`git describe --tags || git rev-parse --short HEAD` | |
export TIMESTAMP=`date +%Y%m%d%H%M` | |
export BUILD_ID="$VERSION-$TIMESTAMP" | |
sudo chown -R `id -u` ${GITHUB_WORKSPACE} | |
mkdir -p $MAVEN_HOME | |
mkdir -p $GRADLE_USER_HOME | |
mkdir -p releases | |
./build_package_android ./releases | |
sudo chmod -R 755 ./releases | |
- name: Upload Apk to Nightly Repository | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
uses: wlixcc/[email protected] | |
with: | |
username: 'drone' | |
server: 'volla.tech' | |
port: 22 | |
ssh_private_key: '${{ secrets.FDROID_DEPLOY_KEY }}' | |
local_path: './releases/*.apk' | |
remote_path: '/fdroid-nightly.volla.tech/builds/volla/android-launcher-qt/' | |
args: '-o CheckHostIP=no -o StrictHostKeyChecking=no' | |
- name: Upload Apk to Release Repository | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
uses: wlixcc/[email protected] | |
with: | |
username: 'drone' | |
server: 'volla.tech' | |
port: 22 | |
ssh_private_key: '${{ secrets.FDROID_DEPLOY_KEY }}' | |
local_path: './releases/*.apk' | |
remote_path: '/fdroid.volla.tech/builds/volla/android-launcher-qt/' | |
args: '-o CheckHostIP=no -o StrictHostKeyChecking=no' | |
release: | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build Changelog | |
id: github_release | |
uses: mikepenz/release-changelog-builder-action@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Release | |
uses: softprops/[email protected] | |
with: | |
body: ${{steps.github_release.outputs.changelog}} |