Release Build #49
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: Release Build | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Release Tag' | |
required: true | |
plugin: | |
description: 'Plugin to build' | |
required: true | |
publish: | |
description: 'Publish: If want ignore' | |
required: false | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Gradle cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle | |
key: gradle-${{ hashFiles('**/*.gradle.kts') }} | |
- name: Release Build | |
run: | | |
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}" | |
bash requirement.sh | |
dl=1 bash make.sh ${{ github.event.inputs.plugin }} | |
APK=$(find . -name '*arm64-v8a*.apk') | |
APK=$(dirname $APK) | |
echo "APK=$APK" >> $GITHUB_ENV | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: APKs | |
path: ${{ env.APK }} | |
publish: | |
name: Publish Release | |
if: github.event.inputs.publish != 'y' | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Donwload Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: APKs | |
path: artifacts | |
- name: Find APKs | |
run: | | |
mkdir -p apks/ | |
find artifacts/ -name "*.apk" -exec cp {} apks/ \; | |
- name: Release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.event.inputs.tag }} | |
file: ./apks/* | |
file_glob: true | |
prerelease: true | |
# - name: Release | |
# run: | | |
# wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.16.0/ghr_v0.16.0_linux_amd64.tar.gz | |
# tar -xvf ghr.tar.gz | |
# mv ghr*linux_amd64/ghr . | |
# mkdir apks | |
# find artifacts -name "*.apk" -exec cp {} apks \; | |
# ./ghr -delete -prerelease -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" apks |