Skip to content

Fix Release

Fix Release #68

Workflow file for this run

name: Create Release Assets
on:
workflow_dispatch:
workflow_call:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Cache gradle
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build APK
run: ./gradlew assembleRelease --stacktrace
- name: 'Check for non-FOSS libraries'
run: |
wget https://github.com/iBotPeaches/Apktool/releases/download/v2.7.0/apktool_2.7.0.jar
wget https://github.com/iBotPeaches/Apktool/raw/master/scripts/linux/apktool
# clone the repo
git clone https://gitlab.com/IzzyOnDroid/repo.git
# create a directory for Apktool and move the apktool* files there
mkdir -p repo/lib/radar/tool
mv apktool* repo/lib/radar/tool
# create an alias for ease of use
chmod u+x repo/lib/radar/tool/apktool
mv repo/lib/radar/tool/apktool_2.7.0.jar repo/lib/radar/tool/apktool.jar
repo/bin/scanapk.php app/build/outputs/apk/release/app-universal-release-unsigned.apk
- name: Sign APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.KEYSTORE_BASE64 }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- uses: kaisugi/[email protected]
id: regex-match
with:
text: ${{ github.ref }}
regex: '(v*-pre*)'
flags: gm
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: ${{ steps.regex-match.outputs.match != '' }}
- name: Set asset_name
id: set_asset_name
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "::set-output name=asset_tag::$TAG_NAME"
- name: Upload APK Universal Asset
id: upload-release-asset-universal-apk
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: app/build/outputs/apk/release/app-universal-release-unsigned-signed.apk
asset_name: pokey-universal-${{ steps.set_asset_name.outputs.asset_tag }}.apk
asset_content_type: application/zip
- name: Upload APK arm64 Asset
id: upload-release-asset-arm64-apk
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk
asset_name: pokey-arm64-v8a-${{ steps.set_asset_name.outputs.asset_tag }}.apk
asset_content_type: application/zip
- name: Upload APK armeabi Asset
id: upload-release-asset-arm64-v8a-apk
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk
asset_name: pokey-armeabi-v7a-${{ steps.set_asset_name.outputs.asset_tag }}.apk
asset_content_type: application/zip