-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a830ce3
commit c38f5ad
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
release: | ||
name: Publish on Google Play | ||
runs-on: [ self-hosted, macOS ] | ||
timeout-minutes: 45 | ||
env: | ||
BUILD_NUMBER: ${{ github.run_number }} | ||
|
||
steps: | ||
# Checkout - https://github.com/actions/checkout | ||
- name: Checkout | ||
uses: actions/checkout@v4.1.7 | ||
|
||
# Setup Java - https://github.com/actions/setup-java | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4.3.0 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
- name: Check JDK version | ||
run: java -version | ||
|
||
# Setup Android - https://github.com/android-actions/setup-android | ||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v3.2.1 | ||
|
||
# Decode Keystore | ||
- name: Decode Keystore | ||
env: | ||
RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }} | ||
|
||
run: | | ||
echo "$RELEASE_KEYSTORE_BASE64" | base64 --decode > release.jks | ||
# Gradlew Bundle Release | ||
- name: build prod | ||
run: ./gradlew app:bundleRelease | ||
env: | ||
RELEASE_KEY_ALIAS: ${{ secrets.RELEASE_KEY_ALIAS }} | ||
RELEASE_KEY_PASS: ${{ secrets.RELEASE_KEY_PASS }} | ||
|
||
# Create GitHub release - https://github.com/softprops/action-gh-release | ||
- name: GitHub Release | ||
uses: softprops/action-gh-release@v2.1.0 | ||
with: | ||
name: Twilight ${{ env.GITHUB_REF_NAME }} | ||
|
||
# Upload Artifact | ||
- name: Upload | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Build Artifacts | ||
path: app/build/outputs/ | ||
|
||
# Set VERSION_INFORMATION | ||
- run: echo "VERSION_INFORMATION=$(${{github.workspace}}/gradlew -q printVersionInformation)" >> $GITHUB_ENV | ||
continue-on-error: true |
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