Skip to content

Commit

Permalink
CI integration - release note
Browse files Browse the repository at this point in the history
  • Loading branch information
kid1412621 committed Apr 24, 2024
1 parent 898d369 commit 81b0971
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 39 deletions.
81 changes: 44 additions & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,50 @@ jobs:
environment: production
runs-on: ubuntu-latest
steps:
# set up env
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate keystore.properties
run: |
cat <<EOF > keystore.properties
storeFile:${{ vars.KEYSTORE_STORE_FILE_PATH }}
storePassword:${{ secrets.KEYSTORE_STORE_PASSWORD }}
keyAlias:${{ secrets.KEYSTORE_KEY_ALIAS }}
keyPassword:${{ secrets.KEYSTORE_KEY_PASSWORD }}
EOF
- name: Generate keystore.jks
run: echo "${{ secrets.KEYSTORE_JKS_BASE64 }}" | base64 --decode > keystore.jks
- name: Generate google-services.json
run: echo "${{ secrets.GOOGLE_SERVICES_BASE64 }}" | base64 --decode > app/google-services.json
# set up env
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate keystore.properties
run: |
cat <<EOF > keystore.properties
storeFile:${{ vars.KEYSTORE_STORE_FILE_PATH }}
storePassword:${{ secrets.KEYSTORE_STORE_PASSWORD }}
keyAlias:${{ secrets.KEYSTORE_KEY_ALIAS }}
keyPassword:${{ secrets.KEYSTORE_KEY_PASSWORD }}
EOF
- name: Generate keystore.jks
run: echo "${{ secrets.KEYSTORE_JKS_BASE64 }}" | base64 --decode > keystore.jks
- name: Generate google-services.json
run: echo "${{ secrets.GOOGLE_SERVICES_BASE64 }}" | base64 --decode > app/google-services.json

# APK for Github Release
- name: Build release APK
run: ./gradlew assembleRelease --no-daemon
- name: Release APK
uses: softprops/action-gh-release@v2
with:
files: app/build/outputs/apk/release/app-release.apk
# APK for Github Release
- name: Build release APK
run: ./gradlew assembleRelease --no-daemon
- name: Generate release notes
run: |
RELEASE_NOTE=$(awk -v version="${{ env.GITHUB_REF }}" '$0 ~ "^## " version " -"{p=1; next} p' CHANGELOG.md | awk NF)
echo RELEASE_NOTE=$RELEASE_NOTE >> $GITHUB_ENV
- name: Publish APK on Github Release
uses: softprops/action-gh-release@v2
with:
files: app/build/outputs/apk/release/app-release.apk
generate_release_notes: true
append_body: true
body: ${{ env.RELEASE_NOTE }}

# AAB for Google Play
- name: Build Release AAB
run: ./gradlew bundleRelease --no-daemon
- name: Upload AAB
uses: actions/upload-artifact@v4
with:
name: subspace
path: app/build/outputs/bundle/release/app-release.aab
# AAB for Google Play
- name: Build Release AAB
run: ./gradlew bundleRelease --no-daemon
- name: Upload AAB
uses: actions/upload-artifact@v4
with:
name: subspace
path: app/build/outputs/bundle/release/app-release.aab

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.1.0 - 2024-04-24

- Initial release
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ android {
applicationId = "me.nanova.subspace"
minSdk = 29
targetSdk = 34
versionCode = 7
versionName = "0.0.1"
versionCode = 8
versionName = "0.1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down

0 comments on commit 81b0971

Please sign in to comment.