Build Manager #132
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: Build Manager | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths: | ||
- '.github/workflows/build.yml' | ||
- 'app/**' | ||
- 'apd/**' | ||
- 'build.gradle.kts' | ||
pull_request: | ||
branches: [ "main" ] | ||
paths: | ||
- 'app/**' | ||
- 'apd/**' | ||
workflow_call: | ||
workflow_dispatch: | ||
jobs: | ||
build-apd: | ||
uses: ./.github/workflows/apd.yml | ||
with: | ||
target: aarch64-linux-android | ||
build-manager: | ||
needs: build-apd | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Generate version | ||
id: parse_version | ||
run: | | ||
COMMIT_NUM=$(git rev-list --count HEAD) | ||
VERSION=$(echo "$COMMIT_NUM + 200 + 10000" | bc) | ||
echo "Generated Version: $VERSION" | ||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: "17" | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
- name: Download arm64 apd | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: apd-aarch64-linux-android | ||
path: . | ||
- name: Copy Libs | ||
run: | | ||
mv aarch64-linux-android/release/apd app/libs/arm64-v8a/libapd.so | ||
- name: Build with Gradle | ||
run: | | ||
ls /usr/local/lib/android/sdk/build-tools/ | ||
which zipalign | ||
# exit 1 | ||
echo 'org.gradle.parallel=true' >> gradle.properties | ||
echo 'org.gradle.vfs.watch=true' >> gradle.properties | ||
echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties | ||
echo 'android.native.buildOutput=verbose' >> gradle.properties | ||
sed -i 's/org.gradle.configuration-cache=true//g' gradle.properties | ||
./gradlew clean assembleRelease | ||
- name: Upload build artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: APatch | ||
path: app/build/outputs/apk/release/*.apk | ||
- name: Sign Release | ||
uses: r0adkll/sign-android-release@v1 | ||
id: sign_app | ||
with: | ||
releaseDirectory: app/build/outputs/apk/release | ||
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | ||
alias: ${{ secrets.ALIAS }} | ||
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | ||
keyPassword: ${{ secrets.KEY_PASSWORD }} | ||
env: | ||
BUILD_TOOLS_VERSION: ${{ shell 'dirname $(which zipalign)' }} | ||
Check failure on line 93 in .github/workflows/build.yml GitHub Actions / Build ManagerInvalid workflow file
|
||
# - name: Release apk | ||
# uses: ncipollo/[email protected] | ||
# with: | ||
# token: ${{ github.token }} | ||
# tag: ${{ steps.parse_version.outputs.VERSION }} | ||
# artifacts: ${{steps.sign_app.outputs.signedReleaseFile}} | ||
# generateReleaseNotes: true | ||
# makeLatest: true | ||
# replacesArtifacts: true |