Skip to content

Commit

Permalink
Set GitHub changelog from fastlane files upon release
Browse files Browse the repository at this point in the history
  • Loading branch information
Abrynos committed Oct 13, 2021
1 parent e2be5b7 commit 7848f36
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- 'v*.*.*'

env:
CHANGELOG_FILE: CHANGELOG.txt

jobs:
build:
name: Release
Expand Down Expand Up @@ -33,17 +36,16 @@ jobs:
run: chmod +x ./gradlew
- id: build
run: ./gradlew build
- id: prepare-empty-changelog
- id: prepare-changelog
run: |
echo "# Changes" > CHANGELOG.txt
echo "- " >> CHANGELOG.txt
echo "- The usual amount of miscellaneous code improvements and optimizations" >> CHANGELOG.txt
echo "# Changes" > "${{ env.CHANGELOG_FILE }}"
sed "s/^* /- /g" "fastlane/metadata/android/en-US/changelogs/$(grep versionCode app/build.gradle | grep -E '[0-9]+' --only-matching).txt" >> "${{ env.CHANGELOG_FILE }}"
- id: create-release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: app/build/outputs/apk/release/app-release.apk
body_path: CHANGELOG.txt
body_path: "${{ env.CHANGELOG_FILE }}"
tag_name: ${{ env.RELEASE_VERSION }}

0 comments on commit 7848f36

Please sign in to comment.