CI: Generate master->beta, stable->latest releases
This commit is contained in:
parent
b24245dd1d
commit
80ce7bde26
|
@ -10,6 +10,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
- stable
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
- 'appveyor.yml'
|
- 'appveyor.yml'
|
||||||
|
@ -26,12 +27,25 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Tag as release build
|
- name: Tag as development build
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
echo #pragma once > src/scmversion/tag.h
|
echo #pragma once > src/scmversion/tag.h
|
||||||
echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
|
|
||||||
echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
|
echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
|
||||||
|
echo #define SCM_RELEASE_TAGS {"latest", "beta"} >> src/scmversion/tag.h
|
||||||
|
echo #define SCM_RELEASE_TAG "beta" >> src/scmversion/tag.h
|
||||||
|
|
||||||
|
|
||||||
|
- name: Tag as stable build
|
||||||
|
if: github.ref == 'refs/heads/stable'
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
echo #pragma once > src/scmversion/tag.h
|
||||||
|
echo #define SCM_RELEASE_ASSET "duckstation-windows-x64-release.zip" >> src/scmversion/tag.h
|
||||||
|
echo #define SCM_RELEASE_TAGS {"latest", "beta"} >> src/scmversion/tag.h
|
||||||
|
echo #define SCM_RELEASE_TAG "latest" >> src/scmversion/tag.h
|
||||||
|
|
||||||
|
|
||||||
- name: Compile x64 release build
|
- name: Compile x64 release build
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
@ -278,7 +292,7 @@ jobs:
|
||||||
./gradlew assembleRelease
|
./gradlew assembleRelease
|
||||||
|
|
||||||
- name: Sign APK
|
- name: Sign APK
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/stable'
|
||||||
uses: r0adkll/sign-android-release@v1
|
uses: r0adkll/sign-android-release@v1
|
||||||
with:
|
with:
|
||||||
releaseDirectory: android/app/build/outputs/apk/release
|
releaseDirectory: android/app/build/outputs/apk/release
|
||||||
|
@ -288,14 +302,14 @@ jobs:
|
||||||
keyPassword: ${{ secrets.APK_KEY_PASSWORD }}
|
keyPassword: ${{ secrets.APK_KEY_PASSWORD }}
|
||||||
|
|
||||||
- name: Rename APK
|
- name: Rename APK
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/stable'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd android
|
cd android
|
||||||
mv app/build/outputs/apk/release/app-release-unsigned-signed.apk ../duckstation-android.apk
|
mv app/build/outputs/apk/release/app-release-unsigned-signed.apk ../duckstation-android.apk
|
||||||
|
|
||||||
- name: Upload APK
|
- name: Upload APK
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/stable'
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: "android"
|
name: "android"
|
||||||
|
@ -355,7 +369,7 @@ jobs:
|
||||||
create-release:
|
create-release:
|
||||||
needs: [windows-build, windows-libretro-build, linux-build, linux-libretro-build, android-build, macos-build]
|
needs: [windows-build, windows-libretro-build, linux-build, linux-libretro-build, android-build, macos-build]
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/stable'
|
||||||
steps:
|
steps:
|
||||||
- name: Download Windows Artifacts
|
- name: Download Windows Artifacts
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
|
@ -402,12 +416,37 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: "macos-x64"
|
name: "macos-x64"
|
||||||
|
|
||||||
- name: Create release
|
- name: Create beta release
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
uses: "marvinpinto/action-automatic-releases@latest"
|
uses: "marvinpinto/action-automatic-releases@latest"
|
||||||
with:
|
with:
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
automatic_release_tag: "latest"
|
automatic_release_tag: "beta"
|
||||||
title: "Latest Development Build"
|
title: "Latest Beta/Development Build"
|
||||||
|
files: |
|
||||||
|
windows/duckstation-windows-x64-release.zip
|
||||||
|
windows/duckstation-windows-arm64-release.zip
|
||||||
|
windows-libretro-x64/duckstation_libretro.dll.zip
|
||||||
|
linux-x64-appimage-sdl/duckstation-sdl-x64.AppImage
|
||||||
|
linux-x64-appimage-sdl-zsync/duckstation-sdl-x64.AppImage.zsync
|
||||||
|
linux-x64-appimage-qt/duckstation-qt-x64.AppImage
|
||||||
|
linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
|
||||||
|
linux-libretro/duckstation_libretro_x64.so.zip
|
||||||
|
linux-libretro/duckstation_libretro_linux_armv7.so.zip
|
||||||
|
linux-libretro/duckstation_libretro_linux_aarch64.so.zip
|
||||||
|
linux-libretro/duckstation_libretro_android_armv7.so.zip
|
||||||
|
linux-libretro/duckstation_libretro_android_aarch64.so.zip
|
||||||
|
android/duckstation-android.apk
|
||||||
|
macos-x64/duckstation-mac-release.zip
|
||||||
|
macos-x64/duckstation_libretro_mac.dylib.zip
|
||||||
|
|
||||||
|
- name: Create stable release
|
||||||
|
if: github.ref == 'refs/heads/stable'
|
||||||
|
uses: "marvinpinto/action-automatic-releases@latest"
|
||||||
|
with:
|
||||||
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
automatic_release_tag: "latest"
|
||||||
|
title: "Latest Stable Build"
|
||||||
files: |
|
files: |
|
||||||
windows/duckstation-windows-x64-release.zip
|
windows/duckstation-windows-x64-release.zip
|
||||||
windows/duckstation-windows-arm64-release.zip
|
windows/duckstation-windows-arm64-release.zip
|
||||||
|
|
Loading…
Reference in New Issue