Skip to content

release

release #4

Workflow file for this run

name: Build Release
on:
push:
branches:
- "master"
paths:
- "CHANGELOG.md"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
outputs_dir: "${{ github.workspace }}/app/build/outputs"
ver_name: ""
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build
run: |
chmod +x *.sh
./install-solib.sh
chmod +x gradlew
./gradlew assembleRelease --build-cache --parallel --daemon --warning-mode all
- name: Init environment variable
run: |
echo "ver_name=$(grep -m 1 'versionName' ${{ env.outputs_dir }}/apk/release/output-metadata.json | cut -d\" -f4)" >> $GITHUB_ENV
- name: Upload Mappings to Artifact
uses: actions/upload-artifact@v3
with:
name: mappings_${{ env.ver_name }}
path: ${{ env.outputs_dir }}/mapping/*/*.txt
- uses: softprops/action-gh-release@v0.1.15
with:
name: ${{ env.ver_name }}
tag_name: ${{ env.ver_name }}
body_path: ${{ github.workspace }}/CHANGELOG.md
draft: false
prerelease: false
files: ${{env.outputs_dir}}/apk/release/*.apk
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}