chore: AOS-cd 에서 echo로 secret 값 받아오는지 확인 #16
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: AOS-cd | |
on: | |
push: | |
branches: | |
- release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 17 | |
- name: Extract Release Version | |
run: echo "##[set-output name=version;]$(echo '${{ github.event.head_commit.message }}' | egrep -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')" | |
id: extract_version_name | |
- name: Create Properties File | |
env: | |
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} | |
run: | | |
echo "$LOCAL_PROPERTIES" > AOS/local.properties | |
echo "$LOCAL_PROPERTIES" | |
echo $LOCAL_PROPERTIES" | |
- name: Create Keystore | |
env: | |
KEYSTORE_B64: ${{ secrets.KEY_STORE_BASE_64 }} | |
run: | | |
echo $KEYSTORE_B64 > keystore_b64.txt | |
base64 --decode --ignore-garbage keystore_b64.txt > keystore.jks | |
working-directory: ./AOS/app | |
- name: Build Release APK | |
env: | |
SIGNING_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
SIGNING_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
run: ./gradlew assembleRelease | |
working-directory: ./AOS | |
- name: ls AOS | |
run: cd AOS/app/build/outputs/apk/release && ls | |
- name: Create Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.extract_version_name.outputs.version }} | |
release_name: ${{ steps.extract_version_name.outputs.version }} | |
files: | | |
AOS/app/build/outputs/apk/release/app-release.apk | |
- name: Upload to Firebase App Distribution | |
uses: wzieba/Firebase-Distribution-Github-Action@v1 | |
with: | |
appId: ${{ secrets.FIREBASE_APP_ID }} | |
serviceCredentialsFileContent: ${{ secrets.FIREBASE_CREDENTIAL_FILE_CONTENT }} | |
groups: test | |
releaseNotesFile: AOS/release_note.txt | |
file: AOS/app/build/outputs/apk/release/app-release.apk |