Skip to content

Commit

Permalink
[RELEASE] - release APK 생성 작업 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Skipancho committed Feb 2, 2023
1 parent 81ab84f commit b4fc5d6
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions .github/workflows/auto_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,45 @@ jobs:
steps:
- uses: actions/checkout@v2.3.4

- name: set up JDK 11
- name: Set up JDK 11
uses: actions/setup-java@v2.2.0
with:
java-version: '11'
distribution: 'adopt'
cache: gradle

- name: Set up Android SDK
uses: android-actions/setup-android@v2

- name: Add API_URL
run: echo "API_URL=\""${{ secrets.API_URL }}"\"" >> ./local.properties

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build

- name: Build release APK
id: buildRelease
run: bash ./gradlew assembleRelease --stacktrace

- name: Test with Gradle
run: ./gradlew --info test
- name: Sign APK
id: sign
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}

- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app
path: app/build/outputs/apk/release/app-release-unsigned-signed.apk

- name: Get version from tag
id: tag_name
run: |
Expand All @@ -48,4 +74,14 @@ jobs:
release_name: Release ${{ github.ref }}
body: ${{ steps.changelog_reader.outputs.changes }}
draft: false
prerelease: false
prerelease: false

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: app/build/outputs/apk/release/app-release-unsigned-signed.apk
asset_name: App.apk
asset_content_type: application/zip

0 comments on commit b4fc5d6

Please # to comment.