Skip to content

Commit

Permalink
Polish release actions
Browse files Browse the repository at this point in the history
Change-Id: Ia9c46f4896124963de2e97ba25566d7a6b70b601
  • Loading branch information
lihenggui committed Jul 7, 2023
1 parent e7c1ad1 commit 9966f4a
Showing 1 changed file with 32 additions and 26 deletions.
58 changes: 32 additions & 26 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,44 @@ jobs:
- name: Build app
run: ./gradlew :app-compose:assembleRelease :app-compose:bundleRelease

- name: Upload built Foss apk
- name: Set apk path
id: apk-path
run: |
foss_path=$(find **/build/outputs/apk/foss -name '*.apk' -type f | head -1)
echo "foss_path=$foss_path" >> $GITHUB_OUTPUT
market_path=$(find **/build/outputs/apk/market -name '*.apk' -type f | head -1)
echo "market_path=$market_path" >> $GITHUB_OUTPUT
- name: Get apk info
id: apk-info
uses: zhaobozhen/apk-info-action@1.1.2
with:
apk-path: ${{ steps.apk-path.outputs.foss_path }}

- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4.0.0-b02
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}

- name: Write whats new info
run: |
mkdir -p distribution/whatsnew/whatsnew-en-US/
echo '${{ steps.build_changelog.outputs.changelog }}' >> distribution/whatsnew/whatsnew-en-US/whats_new.txt
- name: Upload built Market apk
if: success()
uses: actions/upload-artifact@v3
with:
name: app-compose-foss-release.apk
path: ${{ github.workspace }}/app-compose/build/outputs/apk/foss/app-compose-foss-release.apk
name: Blocker-${{ steps.apk-info.outputs.version-code }}-Market-release.apk
path: ${{ steps.apk-path.outputs.market_path }}

- name: Upload built Market apk
- name: Upload built Foss apk
if: success()
uses: actions/upload-artifact@v3
with:
name: app-compose-market-release.apk
path: ${{ github.workspace }}/app-compose/build/outputs/apk/market/release/app-compose-market-release.apk
name: Blocker-${{ steps.apk-info.outputs.version-code }}-FOSS-release.apk
path: ${{ steps.apk-path.outputs.foss_path }}

- name: Upload mappings
if: success()
Expand All @@ -77,26 +102,7 @@ jobs:
track: beta
inAppUpdatePriority: 2
mappingFile: app-compose/build/outputs/mapping/marketRelease/mapping.txt

- name: Set apk path
id: apk-path
run: |
foss_path=$(find **/build/outputs/apk/foss -name '*.apk' -type f | head -1)
echo "foss_path=$foss_path" >> $GITHUB_OUTPUT
market_path=$(find **/build/outputs/apk/market -name '*.apk' -type f | head -1)
echo "market_path=$market_path" >> $GITHUB_OUTPUT
- name: Get apk info
id: apk-info
uses: zhaobozhen/apk-info-action@1.1.2
with:
apk-path: ${{ steps.apk-path.outputs.foss_path }}

- name: Build Changelog
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4.0.0-b02
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
whatsNewDirectory: distribution/whatsnew

- name: Create Release
id: create_release
Expand Down

0 comments on commit 9966f4a

Please sign in to comment.