mirror of
https://github.com/meowarex/rl-mobile.git
synced 2026-06-18 05:23:12 +10:00
+28
-23
@@ -1,40 +1,45 @@
|
|||||||
name: Build Debug App
|
name: Build Release App
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_call:
|
||||||
branches: [main]
|
secrets:
|
||||||
pull_request:
|
keyAlias:
|
||||||
branches: [main]
|
required: true
|
||||||
workflow_dispatch:
|
keyPassword:
|
||||||
|
required: true
|
||||||
permissions:
|
keystorePassword:
|
||||||
contents: read
|
required: true
|
||||||
|
keystore:
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup JDK 21
|
- uses: actions/setup-java@v4
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 21
|
||||||
distribution: zulu
|
distribution: zulu
|
||||||
|
|
||||||
- name: Setup Gradle
|
- uses: gradle/actions/setup-gradle@v4
|
||||||
uses: gradle/actions/setup-gradle@v4
|
|
||||||
with:
|
|
||||||
cache-read-only: ${{ github.event_name == 'pull_request' }}
|
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build
|
||||||
working-directory: Manager
|
working-directory: Manager
|
||||||
run: ./gradlew :app:assembleDebug --stacktrace
|
env:
|
||||||
|
SIGNING_KEY_ALIAS: ${{ secrets.keyAlias }}
|
||||||
|
SIGNING_KEY_PASSWORD: ${{ secrets.keyPassword }}
|
||||||
|
SIGNING_STORE_PASSWORD: ${{ secrets.keystorePassword }}
|
||||||
|
SIGNING_STORE_FILE: ${{ github.workspace }}/release.keystore
|
||||||
|
RELEASE: true
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.keystore }}" | base64 -d > ${{ github.workspace }}/release.keystore
|
||||||
|
./gradlew :app:packageRelease --stacktrace
|
||||||
|
rm ${{ github.workspace }}/release.keystore
|
||||||
|
|
||||||
- name: Upload artifacts
|
- uses: actions/upload-artifact@v4
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: app
|
name: rl-mobile-artifacts
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
path: Manager/app/build/outputs/apk/debug/app-debug.apk
|
path: Manager/app/build/outputs/apk/release/app-release.apk
|
||||||
|
|||||||
@@ -1,65 +1,38 @@
|
|||||||
name: Build & Publish Release App
|
name: "[main] Release"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: [ "v*.*.*" ]
|
branches:
|
||||||
|
- main
|
||||||
concurrency:
|
paths-ignore:
|
||||||
group: "release"
|
- "**/*.md"
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
Build:
|
||||||
|
uses: ./.github/workflows/build.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
Release:
|
||||||
|
name: Publish Release
|
||||||
|
needs: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Download artifacts
|
||||||
uses: actions/checkout@v4
|
uses: actions/download-artifact@v4
|
||||||
|
|
||||||
- name: Setup JDK 21
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
with:
|
||||||
java-version: 21
|
name: rl-mobile-artifacts
|
||||||
distribution: zulu
|
path: ./dist/
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Rename APK
|
||||||
uses: gradle/actions/setup-gradle@v4
|
run: mv ./dist/app-release.apk ./dist/rl-mobile-manager.apk
|
||||||
|
|
||||||
|
- name: Publish release
|
||||||
|
uses: marvinpinto/action-automatic-releases@latest
|
||||||
with:
|
with:
|
||||||
cache-write-only: true
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
automatic_release_tag: latest
|
||||||
- name: Build with Gradle
|
prerelease: false
|
||||||
working-directory: Manager
|
title: Latest Release
|
||||||
env:
|
files: ./dist/**
|
||||||
SIGNING_KEY_ALIAS: ${{ secrets.keyAlias }}
|
|
||||||
SIGNING_KEY_PASSWORD: ${{ secrets.keyPassword }}
|
|
||||||
SIGNING_STORE_PASSWORD: ${{ secrets.keystorePassword }}
|
|
||||||
SIGNING_STORE_FILE: ${{ github.workspace }}/release.keystore
|
|
||||||
RELEASE: true
|
|
||||||
run: |
|
|
||||||
echo "${{ secrets.keystore }}" | base64 -d > ${{ github.workspace }}/release.keystore
|
|
||||||
./gradlew :app:packageRelease --stacktrace
|
|
||||||
rm ${{ github.workspace }}/release.keystore
|
|
||||||
|
|
||||||
- name: Upload artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: app
|
|
||||||
if-no-files-found: error
|
|
||||||
path: Manager/app/build/outputs/apk/release/app-release.apk
|
|
||||||
|
|
||||||
- name: Publish Release
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
tag="${{ github.ref_name }}"
|
|
||||||
apk_file="rl-mobile-manager-$tag.apk"
|
|
||||||
mv -T ./Manager/app/build/outputs/apk/release/app-release.apk "./$apk_file"
|
|
||||||
|
|
||||||
gh release create "$tag" \
|
|
||||||
--title "$tag" \
|
|
||||||
--generate-notes \
|
|
||||||
--verify-tag \
|
|
||||||
--fail-on-no-commits \
|
|
||||||
"./$apk_file"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user