new release #6
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 Release | |
on: | |
release: | |
types: [published] | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
name: Build Arcticons APK | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking out branch | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
cache: gradle | |
- name: Write sign info | |
run: | | |
echo "Workflow manually triggered by ${{ github.actor }}" | |
if [ ! -z "${{ secrets.KEYSTORE }}" ]; then | |
echo storePassword='${{ secrets.KEYSTORE_PASSWORD }}' >> keystore.properties | |
echo keyAlias='${{ secrets.KEY_ALIAS }}' >> keystore.properties | |
echo keyPassword='${{ secrets.KEY_PASSWORD }}' >> keystore.properties | |
echo storeFile='${{ github.workspace }}/key.jks' >> keystore.properties | |
echo ${{ secrets.KEYSTORE }} | base64 --decode > ${{ github.workspace }}/key.jks | |
fi | |
- name: Get Gradle | |
run: gradle wrapper | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build Normal APK | |
run: ./gradlew app:assemblenormalRelease | |
- name: Build Black APK | |
run: ./gradlew app:assembleblackRelease | |
- name: Build You APK | |
run: ./gradlew app:assembleyouRelease | |
- name: Build Day&Night | |
run: ./gradlew app:assembledayNightRelease | |
- name: Get Release Notes | |
id: image | |
run: | | |
name=$(< ./generated/releaseName.txt) | |
name=$(echo $name | tr '\n' ' ') | |
image="![releaseImage](https://github.com/Arcticons-Team/Arcticons/blob/$GITHUB_REF_NAME/generated/releaseImage.jpg)" | |
changelog=$(< ./generated/changelog.md) | |
changelog="$changelog | |
$image" | |
gh release create $GITHUB_REF_NAME --generate-notes --title "$name" --notes "$changelog" --discussion-category "Announcements" app/build/outputs/apk/normal/release/*.apk app/build/outputs/apk/black/release/*.apk app/build/outputs/apk/dayNight/release/*.apk app/build/outputs/apk/you/release/*.apk | |
env: | |
GH_TOKEN: ${{ github.token }} | |