Remove post-fs-data.sh #160
Workflow file for this run
This file contains hidden or 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: Android CI | |
on: | |
push: | |
branches: | |
- '**' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get current time | |
uses: 1466587594/get-current-time@v2 | |
id: current-time | |
with: | |
format: YYYYMMDD-HH | |
utcOffset: "+08:00" | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libarchive-zip-perl | |
- name: Decode proguard rules | |
uses: mobiledevops/secret-to-file-action@v1 | |
with: | |
base64-encoded-secret: ${{ secrets.PROGUARD_RULES }} | |
filename: "app/proguard-rules.pro" | |
- name: Decode keystore | |
uses: mobiledevops/secret-to-file-action@v1 | |
with: | |
base64-encoded-secret: ${{ secrets.SIGNING_STORE_BASE64 }} | |
filename: "app/keystore.jks" | |
- uses: AdoptOpenJDK/install-jdk@v1 | |
with: | |
version: '17' | |
architecture: x64 | |
- name: Build Riru modules | |
run: cd ./module && bash ./make.sh | |
env: | |
BUILD_RELEASE_MINIFYENABLED: ${{ vars.BUILD_RELEASE_MINIFYENABLED }} | |
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean && ./gradlew ":app:assembleRelease" -Pxposed=true | |
env: | |
BUILD_RELEASE_MINIFYENABLED: ${{ vars.BUILD_RELEASE_MINIFYENABLED }} | |
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
- name: Upload Apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: xposed.${{ steps.current-time.outputs.formattedTime }} | |
path: app/build/outputs/apk/release/*.apk | |
- name: Upload Mapping | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mapping.${{ steps.current-time.outputs.formattedTime }} | |
path: app/build/outputs/mapping/release/mapping.txt | |
- name: Upload Riru Modules | |
uses: actions/upload-artifact@v4 | |
with: | |
name: magisk.${{ steps.current-time.outputs.formattedTime }} | |
path: | | |
module/build/release/*.zip | |
!module/build/release/*-all-*.zip | |
- name: Assign release version from version.properties to Env variable | |
run: | | |
cat ./app/build.gradle| grep versionName | sed -E 's/.+"(.+)".*/release_version=\1/g' >> $GITHUB_ENV | |
- name: Echo release version from Env variable | |
run: | | |
echo "${{ env.release_version }}" | |
- name: Delete drafts | |
uses: hugo19941994/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release draft | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
name: "${{ env.release_version }}" | |
tag_name: "${{ env.release_version }}-ci" | |
files: | | |
module/build/release/*.zip | |
app/build/outputs/apk/release/*.apk | |
app/build/outputs/mapping/release/mapping.txt | |
body: "[Github Action](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})" | |
- name: Check WebDAV credentials | |
id: check-webdav | |
run: | | |
if [[ -n "${{ secrets.WEBDAV_ADDRESS }}" && -n "${{ secrets.WEBDAV_USERNAME }}" && -n "${{ secrets.WEBDAV_PASSWORD }}" ]]; then | |
echo "webdav_available=true" >> $GITHUB_OUTPUT | |
echo "WebDAV credentials are available" | |
else | |
echo "webdav_available=false" >> $GITHUB_OUTPUT | |
echo "WebDAV credentials are missing or incomplete" | |
fi | |
- name: Upload artifacts - Xposed | |
if: steps.check-webdav.outputs.webdav_available == 'true' | |
uses: Wandalen/wretry.action@master | |
with: | |
action: bxb100/action-upload@main | |
with: | | |
provider: webdav | |
provider_options: | | |
endpoint=${{secrets.WEBDAV_ADDRESS}} | |
username=${{secrets.WEBDAV_USERNAME}} | |
password=${{secrets.WEBDAV_PASSWORD}} | |
root=/${{ env.release_version }}-dev | |
include: | | |
app/build/outputs/apk/release/*.apk | |
attempt_limit: 3 | |
attempt_delay: 0 | |
- name: Upload artifacts - Zygisk | |
if: steps.check-webdav.outputs.webdav_available == 'true' | |
uses: Wandalen/wretry.action@master | |
with: | |
action: bxb100/action-upload@main | |
with: | | |
provider: webdav | |
provider_options: | | |
endpoint=${{secrets.WEBDAV_ADDRESS}} | |
username=${{secrets.WEBDAV_USERNAME}} | |
password=${{secrets.WEBDAV_PASSWORD}} | |
root=/${{ env.release_version }}-dev | |
include: | | |
module/build/release/zygisk-*.zip | |
attempt_limit: 3 | |
attempt_delay: 0 | |
- name: Upload artifacts - Riru | |
if: steps.check-webdav.outputs.webdav_available == 'true' | |
uses: Wandalen/wretry.action@master | |
with: | |
action: bxb100/action-upload@main | |
with: | | |
provider: webdav | |
provider_options: | | |
endpoint=${{secrets.WEBDAV_ADDRESS}} | |
username=${{secrets.WEBDAV_USERNAME}} | |
password=${{secrets.WEBDAV_PASSWORD}} | |
root=/${{ env.release_version }}-dev | |
include: | | |
module/build/release/riru-*.zip | |
attempt_limit: 3 | |
attempt_delay: 0 |