Manual Release #12
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: Manual Release | |
on: | |
workflow_dispatch: | |
inputs: | |
publish: | |
description: "Publish to Xposed Module Repository" | |
type: boolean | |
default: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking out branch | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
with: | |
gradle-home-cache-cleanup: true | |
- name: Decode Keystore | |
run: | | |
echo "${{ secrets.KEYSTORE_BASE64 }}" >> jks.base64 | |
base64 -d jks.base64 > keystore.jks | |
- name: Build with Gradle | |
env: | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
run: | | |
./gradlew clean assembleRelease | |
- name: Generate tag name | |
run: | | |
VERSION_CODE=$(cat ./app/build/outputs/apk/release/versionCode) | |
VERSION_NAME=$(cat ./app/build/outputs/apk/release/versionName) | |
echo "TAG_NAME=$VERSION_CODE-$VERSION_NAME" >> $GITHUB_ENV | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: BanUninstall | |
path: app/build/outputs/apk/release/*.apk | |
# - name: Release to current repository | |
# uses: softprops/action-gh-release@v2 | |
# with: | |
# name: BanUninstall | |
# tag_name: ${{ env.TAG_NAME }} | |
# body_path: ${{ github.workspace }}/CHANGELOG.md | |
# token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
# files: | | |
# app/build/outputs/apk/release/*.apk | |
# - name: Release to xposed module repository | |
# uses: softprops/action-gh-release@v2 | |
# if: ${{ inputs.publish }} | |
# with: | |
# name: ${{ format('BanUninstall_{0}', env.TAG_NAME) }} | |
# tag_name: ${{ env.TAG_NAME }} | |
# body_path: ${{ github.workspace }}/CHANGELOG.md | |
# repository: Xposed-Modules-Repo/cn.tinyhai.ban_uninstall | |
# token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
# files: | | |
# app/build/outputs/apk/release/*.apk |