Skip to content

release 1.0.1

release 1.0.1 #5

name: AOS-distribute
on:
push:
branches:
- distribute
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: Create Properties File
env:
RELEASE_KEYSTORE: ${{ secrets.KEY_STORE_BASE_64 }}
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }}
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: |
echo "$RELEASE_KEYSTORE" | base64 -d > AOS/app/release.keystore
echo "$KEYSTORE_PROPERTIES" > AOS/keystore.properties
echo "$LOCAL_PROPERTIES" > AOS/local.properties
- name: Create google-services.json
run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > AOS/app/google-services.json
- name: Build Release AAB
run: ./gradlew bundleRelease
working-directory: ./AOS
- name: Upload AAB
uses: actions/upload-artifact@v2
with:
name: app-release.aab
path: AOS/app/build/outputs/bundle/release/app-release.aab
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download AAB
uses: actions/download-artifact@v2
with:
name: app-release.aab
path: AOS/app/build/outputs/bundle/release/
- name: Create service_account.json
run: echo '${{ secrets.GOOGLE_PLAY_STORE_SERVICE_ACCOUT }}' > service_account.json
- 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 GitHub 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/bundle/release/app-release.aab
- name: Deploy to Google Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJson: service_account.json
packageName: boostcamp.and07.mindsync
releaseName: ${{ steps.extract_version_name.outputs.version }}
releaseFiles: AOS/app/build/outputs/bundle/release/app-release.aab
track: production
whatsNewDirectory: AOS/whatsNewDirectory