[preview] release preview_1.6-beta1 #117
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: preview_release | |
on: | |
push: | |
tags: | |
- "preview_*" | |
paths-ignore: | |
- '.github/**' | |
jobs: | |
build: | |
name: Build & Release Preview | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Generate Sign Config | |
env: | |
SECRETS_KEY: ${{ secrets.KEY }} | |
SECRETS_STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | |
SECRETS_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
SECRETS_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
KEYSTORE_FILE: ${{ github.workspace }}/key.jdk | |
CONFIG_FILE: ${{ github.workspace }}/signing.properties | |
run: | | |
bash ${{ github.workspace }}/scripts/generate_signing_key.sh | |
- name: Prepare Gradlew | |
# just download gradle wrapper, start gradle daemon, make actual build logs clean | |
run: | | |
./gradlew clean | |
- name: Build with Gradle (Assemble PreviewRelease) | |
run: | | |
./gradlew assemblePreviewRelease --stacktrace | |
- name: Collect Files | |
run: | | |
# collect files | |
mkdir products | |
./gradlew PublishPreviewRelease --stacktrace | |
echo "Artifacts:" | |
tree -aF ./products | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: preview_release_build | |
path: | | |
products/PreviewRelease/*.apk | |
products/PreviewRelease/*.sha* | |
retention-days: 30 | |
- name: Upload mapping.txt | |
uses: actions/upload-artifact@v4 | |
with: | |
name: preview_mapping | |
path: products/PreviewRelease/PhonographPlus*.txt.gz | |
- name: Generate Changelog | |
run: | | |
# generate changelog | |
./gradlew tools:changelog-generator:GenerateEncodedUrl | |
- name: Release New Version | |
uses: softprops/action-gh-release@v1 | |
id: release_github | |
if: startsWith(github.ref, 'refs/tags/preview_') | |
with: | |
name: "${{ github.ref_name }}" | |
files: | | |
products/PreviewRelease/PhonographPlus_*.apk | |
products/PreviewRelease/PhonographPlus_*.apk.sha1 | |
products/PreviewRelease/PhonographPlus_*.apk.sha256 | |
products/PreviewRelease/PhonographPlus*.txt.gz | |
prerelease: true | |
draft: false | |
tag_name: ${{ github.ref }} | |
body: Preview Release - ${{ github.ref }} | |
body_path: ${{ github.workspace }}/GitHubReleaseNote.md | |
token: ${{ secrets.TOKEN }} | |
- name: Upload to Channel | |
if: startsWith(github.ref, 'refs/tags/preview_') | |
env: | |
REPO_ROOT: ${{ github.workspace }} | |
GIT_REF_NAME: ${{ github.ref_name }} | |
GIT_COMMIT_SHA: ${{ github.sha }} | |
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} | |
TG_CHAT_ID: ${{ secrets.TG_CHAT_ID }} | |
run: | | |
bash ${{ github.workspace }}/scripts/upload_apk_with_changelog.sh | |
- name: Clean up | |
run: | | |
rm -r -v ./products/PreviewRelease |