Skip to content

Commit

Permalink
Update BuildRelease.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiserdragon2 committed Jul 27, 2024
1 parent 6aaa26a commit abab550
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .github/workflows/BuildRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,56 @@ jobs:
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 Owner Name
run:
echo ${{github.repository_owner}}
echo ${{github.ref}}
if: github.repository_owner == 'Kaiserdragon2'
- name: Write sign info
run: |
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=$(cat ./generated/releaseName.txt)
name=$(echo $name | tr '\n' ' ')
image="![releaseImage](https://github.com/Arcticons-Team/Arcticons/blob/$GITHUB_REF_NAME/generated/releaseImage.jpg)"
image="![releaseImage](https://github.com/Kaiserdragon2/Arcticons/blob/$GITHUB_REF_NAME/generated/releaseImage.jpg)"
changelog=$(cat ./generated/changelog.md)
changelog="$changelog $image"
echo $GITHUB_REF_NAME
echo $name
echo $changelog
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 }}
Expand Down

0 comments on commit abab550

Please sign in to comment.