docs: 릴리즈 노트 업데이트 #33
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: Library Generate Release | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
generate_release_note: | |
runs-on: ubuntu-latest | |
outputs: | |
msg: ${{ steps.releaseNote.outputs.val }} | |
steps: | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- uses: actions/checkout@v4 | |
- name: SetUp properties | |
run: | | |
echo "keystore.release.file_path=${{ secrets.KEYSTORE_RELEASE_FILE_PATH }}" > local.properties | |
echo "keystore.release.store_password=${{ secrets.KEYSTORE_RELEASE_PW }}" >> local.properties | |
echo "keystore.release.key_alias=${{ secrets.KEYSTORE_RELEASE_ALIAS }}" >> local.properties | |
echo "keystore.release.key_password=${{ secrets.KEYSTORE_RELEASE_KEY_PW }}" >> local.properties | |
echo "base_url=\"${{ secrets.BASE_URL }}\"" >> local.properties | |
echo "auth_type=\"${{ secrets.AUTH_TYPE }}\"" >> local.properties | |
- name: Generate ReleaseNote | |
id: releaseNote | |
run: | | |
./gradlew generateReleaseNote | |
RELEASE_BODY=$(sed -n '2,$p' appRelease/release_note.txt | less) | |
RELEASE_BODY="${RELEASE_BODY//'%'/'%'}" | |
RELEASE_BODY="${RELEASE_BODY//$'\n'/'\n'}" | |
RELEASE_BODY="${RELEASE_BODY//$'\r'/'\r'}" | |
echo "val=${RELEASE_BODY}" >> "$GITHUB_OUTPUT" | |
deploy_firebase: | |
runs-on: ubuntu-latest | |
needs: generate_release_note | |
outputs: | |
versionCode: ${{ steps.versionInfo.outputs.code }} | |
versionName: ${{ steps.versionInfo.outputs.name }} | |
steps: | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- uses: actions/checkout@v4 | |
- name: SetUp properties | |
run: | | |
echo "keystore.release.file_path=${{ secrets.KEYSTORE_RELEASE_FILE_PATH }}" > local.properties | |
echo "keystore.release.store_password=${{ secrets.KEYSTORE_RELEASE_PW }}" >> local.properties | |
echo "keystore.release.key_alias=${{ secrets.KEYSTORE_RELEASE_ALIAS }}" >> local.properties | |
echo "keystore.release.key_password=${{ secrets.KEYSTORE_RELEASE_KEY_PW }}" >> local.properties | |
echo "base_url=\"${{ secrets.BASE_URL }}\"" >> local.properties | |
echo "auth_type=\"${{ secrets.AUTH_TYPE }}\"" >> local.properties | |
- name: SetUp Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' | |
bundler-cache: true | |
- name: Execute Fastlane | |
uses: maierj/fastlane-action@v3.1.0 | |
with: | |
lane: 'firebaseDeploy' | |
options: | | |
{ | |
"build_type": "release", | |
"release_message": "${{ needs.generate_release_note.outputs.msg }}", | |
"token": "${{ secrets.FIREBASE_TOKEN }}", | |
"app_id": "${{ secrets.FIREBASE_RELEASE_APP_ID }}" | |
} | |
- name: Generate Version | |
id: versionInfo | |
run: | | |
echo "code=$(./gradlew -q getVersionCode)" >> "$GITHUB_OUTPUT" | |
echo "name=$(./gradlew -q getVersionName)" >> "$GITHUB_OUTPUT" | |
gnerate_release: | |
runs-on: ubuntu-latest | |
needs: [deploy_firebase, generate_release_note] | |
steps: | |
# echo "code=$(grep versionCode buildSrc/src/main/java/Dependencies.kt | awk '{print $5}')" >> "$GITHUB_OUTPUT" | |
# echo "name=$(grep versionName buildSrc/src/main/java/Dependencies.kt | awk '{print $5}')" >> "$GITHUB_OUTPUT" | |
# echo "title=$(sed -n -e '1,1p' appRelease/release_note.txt)" >> "$GITHUB_OUTPUT" | |
# RELEASE_BODY="${RELEASE_BODY//'%'/'%25'}" | |
# RELEASE_BODY="${RELEASE_BODY//$'\r'/'%0D'}" | |
- name: Message Parser | |
id: message_parser | |
run: | | |
RELEASE_BODY="${{ needs.generate_release_note.outputs.msg }}" | |
RELEASE_BODY="${RELEASE_BODY//$'\n'/'<br>'}" | |
echo "val=${RELEASE_BODY}" >> "$GITHUB_OUTPUT" | |
- name: Generate Tag | |
id: tag | |
run: | | |
CURRENT_DATE=$(date +"%Y년%m월%d일_%H시%M분") | |
echo "val=$CURRENT_DATE" >> "$GITHUB_OUTPUT" | |
- name: Generate Release | |
uses: ncipollo/release-action@v1.14.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag: ${{ steps.tag.outputs.val }} | |
name: ${{ needs.deploy_firebase.outputs.versionName }} (${{ needs.deploy_firebase.outputs.versionCode }}) | |
body: | | |
## Changes | |
${{ steps.message_parser.outputs.val }} | |
slack_notify: | |
runs-on: ubuntu-latest | |
needs: [deploy_firebase, generate_release_note] | |
steps: | |
- uses: 8398a7/action-slack@v3 | |
with: | |
status: custom | |
custom_payload: | | |
{ | |
text: '[AOS/:til_icon:] 릴리즈 알림', | |
attachments: [{ | |
color: '${{ job.status }}' === 'success' ? 'good' : '${{ job.status }}' === 'failure' ? 'danger' : 'warning', | |
fields: [ | |
{ | |
title: 'BuildType', | |
value: 'Release', | |
short: true | |
}, | |
{ | |
title: 'Version', | |
value: '${{ needs.deploy_firebase.outputs.versionName }} (${{ needs.deploy_firebase.outputs.versionCode }})', | |
short: true | |
}, | |
{ | |
title: 'Message', | |
value: '${{ needs.generate_release_note.outputs.msg }}', | |
short: false | |
}] | |
}] | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_AOS_DEPLOY_WEBHOOK_URL }} | |
if: always() |