Nightly Obfuscation #36
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: 'Nightly Obfuscation' | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
name: Build obfuscated application | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get latest release tag | |
id: get_latest_release | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const latestRelease = await github.rest.repos.getLatestRelease({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
}); | |
core.setOutput('tag_name', latestRelease.data.tag_name); | |
- name: Checkout latest release | |
uses: actions/checkout@v4 | |
with: | |
ref: "${{ steps.get_latest_release.outputs.tag_name }}" | |
- name: Setup JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
- name: Restore keystore | |
run: | | |
echo "${{ secrets.RELEASE_KEYSTORE }}" > smartautoclicker.jks.asc | |
gpg -d --passphrase "${{ secrets.RELEASE_KEYSTORE_PASSPHRASE }}" --batch smartautoclicker.jks.asc > smartautoclicker/smartautoclicker.jks | |
- name: Build with Gradle | |
run: | | |
./gradlew \ | |
-PrandomizeAppId="true" \ | |
-PsigningStorePassword="${{ secrets.SIGNING_STORE_PASSWORD }}" \ | |
-PsigningKeyAlias="${{ secrets.SIGNING_KEY_ALIAS }}" \ | |
-PsigningKeyPassword="${{ secrets.SIGNING_KEY_PASSWORD }}" \ | |
assembleFDroidRelease | |
# Upload the file as a release asset to the specified release | |
- name: Upload release asset | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: smartautoclicker/build/outputs/apk/fDroid/release/smartautoclicker-fDroid-release.apk | |
tag_name: 'obfuscation-start' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |