Build IceRaven Dark Theme (Auto-Release) #86
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 IceRaven Dark Theme (Auto-Release) | |
on: | |
schedule: | |
- cron: '00 0 * * *' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y wget apktool zipalign apksigner jq openjdk-17-jdk | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Get Latest IceRaven ARM64 Release | |
id: get_release | |
run: | | |
LATEST_RELEASE=$(jq -r '.assets[] | select(.name | contains("arm64") and contains("forkRelease.apk")) | .browser_download_url' < <(curl -s https://api.github.com/repos/fork-maintainers/iceraven-browser/releases/latest)) | |
echo "LATEST_RELEASE=$LATEST_RELEASE" >> $GITHUB_OUTPUT | |
echo "ICERAVEN_VERSION=$(echo $LATEST_RELEASE | sed -E 's/.*iceraven-(.*)-browser.*/\1/')" >> $GITHUB_OUTPUT | |
- name: Download Latest APK | |
run: | | |
wget -q "${{ steps.get_release.outputs.LATEST_RELEASE }}" -O iceraven.apk | |
- name: Run Build Script | |
run: bash build.sh | |
- name: Sign APK | |
run: | | |
echo "${{ secrets.KEYSTORE }}" | base64 -di > keystore.jks | |
apksigner sign --ks keystore.jks --ks-pass pass:${{ secrets.KEYSTORE_PASSPHRASE }} --key-pass pass:${{ secrets.KEY_PASSWORD }} iceraven-patched-signed.apk | |
- name: Upload APK as Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: iceraven-dark-apk | |
path: iceraven-patched-signed.apk | |
- name: Create Release (if new version) | |
id: create_release | |
if: steps.get_release.outputs.ICERAVEN_VERSION != steps.latest_release.outputs.tag_name | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} # Use the PAT secret | |
with: | |
tag_name: ${{ steps.get_release.outputs.ICERAVEN_VERSION }} | |
files: iceraven-patched-signed.apk | |
- name: Get latest release info | |
id: latest_release | |
if: steps.create_release.outcome == 'success' | |
uses: cardinalby/git-get-release-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
with: | |
latest: true |