CI: Add play store builder
This commit is contained in:
parent
8e6b6377e2
commit
f10134251b
|
@ -11,6 +11,7 @@ on:
|
|||
branches:
|
||||
- master
|
||||
- dev
|
||||
- play-store
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'appveyor.yml'
|
||||
|
@ -21,6 +22,7 @@ on:
|
|||
jobs:
|
||||
windows-build:
|
||||
runs-on: windows-2019
|
||||
if: github.ref != 'refs/heads/play-store'
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
|
@ -113,6 +115,7 @@ jobs:
|
|||
|
||||
windows-arm64-build:
|
||||
runs-on: windows-2019
|
||||
if: github.ref != 'refs/heads/play-store'
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
|
@ -181,6 +184,7 @@ jobs:
|
|||
|
||||
linux-build:
|
||||
runs-on: ubuntu-20.04
|
||||
if: github.ref != 'refs/heads/play-store'
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
|
@ -228,7 +232,7 @@ jobs:
|
|||
|
||||
linux-libretro-build:
|
||||
runs-on: ubuntu-20.04
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
|
||||
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') && github.ref != 'refs/heads/play-store'
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
|
@ -327,7 +331,7 @@ jobs:
|
|||
./gradlew assembleRelease
|
||||
|
||||
- name: Sign APK
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store'
|
||||
uses: r0adkll/sign-android-release@v1
|
||||
with:
|
||||
releaseDirectory: android/app/build/outputs/apk/release
|
||||
|
@ -337,21 +341,23 @@ jobs:
|
|||
keyPassword: ${{ secrets.APK_KEY_PASSWORD }}
|
||||
|
||||
- name: Rename APK
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store'
|
||||
shell: bash
|
||||
run: |
|
||||
cd android
|
||||
mv app/build/outputs/apk/release/app-release-unsigned-signed.apk ../duckstation-android.apk
|
||||
|
||||
- name: Upload APK
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/play-store'
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: "android"
|
||||
path: "duckstation-android.apk"
|
||||
|
||||
|
||||
macos-build:
|
||||
runs-on: macos-10.15
|
||||
if: github.ref != 'refs/heads/play-store'
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
with:
|
||||
|
@ -388,7 +394,7 @@ jobs:
|
|||
create-release:
|
||||
needs: [windows-build, windows-arm64-build, linux-build, linux-libretro-build, android-build]
|
||||
runs-on: "ubuntu-20.04"
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev'
|
||||
if: (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') && github.ref != 'refs/heads/play-store'
|
||||
steps:
|
||||
- name: Download Windows Artifacts
|
||||
uses: actions/download-artifact@v1
|
||||
|
@ -480,3 +486,23 @@ jobs:
|
|||
linux-libretro/duckstation_libretro_android_aarch64.so.zip
|
||||
android/duckstation-android.apk
|
||||
|
||||
|
||||
create-play-store-release:
|
||||
needs: [android-build]
|
||||
runs-on: "ubuntu-20.04"
|
||||
if: github.ref == 'refs/heads/play-store'
|
||||
steps:
|
||||
- name: Download Android APK
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: "android"
|
||||
|
||||
- name: Create Play Store release
|
||||
uses: "marvinpinto/action-automatic-releases@latest"
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "play-store-release"
|
||||
prerelease: true
|
||||
title: "Latest Play Store Build"
|
||||
files: |
|
||||
android/duckstation-android.apk
|
||||
|
|
Loading…
Reference in New Issue