mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 00:07:05 +05:30
feat: rework release pipeline to use centralized changelog
This commit is contained in:
parent
9b2da12451
commit
eaf6d55108
1 changed files with 32 additions and 5 deletions
37
.github/workflows/release.yml
vendored
37
.github/workflows/release.yml
vendored
|
@ -9,7 +9,7 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
|
||||
with:
|
||||
depth: 0
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc # tag=v3.6.0
|
||||
|
@ -34,19 +34,47 @@ jobs:
|
|||
env:
|
||||
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
|
||||
|
||||
- name: Prepare release assets
|
||||
- name: Get current version
|
||||
shell: bash
|
||||
run: |
|
||||
# Remove the `-SNAPSHOT` suffix
|
||||
./gradlew -q --no-configuration-cache clearPreRelease
|
||||
VERSION="$(tail -n1 android/version.properties | cut -d = -f 2)"
|
||||
echo VERSION="${VERSION}" >> $GITHUB_ENV
|
||||
|
||||
- name: Update changelog
|
||||
uses: thomaseizinger/keep-a-changelog-new-release@5bc232893483441c5d6cd6c9dcb1e48abf9a2bae # 1.3.0
|
||||
with:
|
||||
tag: ${{ env.VERSION }}
|
||||
|
||||
- name: Commit changes
|
||||
shell: bash
|
||||
run: |
|
||||
git commit -am 'feat(release): bump version'
|
||||
|
||||
# Build the release assets
|
||||
- name: Build release assets
|
||||
shell: bash
|
||||
run: |
|
||||
./gradlew --no-configuration-cache collectReleaseApks collectReleaseBundle
|
||||
|
||||
- name: Clean secrets
|
||||
run: scripts/signing-cleanup.sh
|
||||
|
||||
- name: Get Changelog Entry
|
||||
id: changelog_reader
|
||||
uses: mindsers/changelog-reader-action@8f405204c383ffc2ff8646e9ae4daf7aa3a8b213 # v2.2.1
|
||||
with:
|
||||
version: ${{ env.VERSION }}
|
||||
path: ./CHANGELOG.md
|
||||
|
||||
- name: Write release notes file
|
||||
shell: bash
|
||||
env:
|
||||
CHANGELOG: ${{ steps.changelog_reader.outputs.changes }}
|
||||
run: |
|
||||
mkdir -p distribution/whatsnew
|
||||
printf '## Changelog\n' > distribution/whatsnew/whatsnew-en-GB
|
||||
printf '%s' "${CHANGELOG}" >> distribution/whatsnew/whatsnew-en-GB
|
||||
|
||||
- name: Publish bundle to Google Play
|
||||
uses: r0adkll/upload-google-play@78c9e796b1035c94169c101d8e46cb880194bfc3 # tag=v1.0.19
|
||||
with:
|
||||
|
@ -64,7 +92,6 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.POST_RELEASE_GH_TOKEN }}
|
||||
run: |
|
||||
# Tag the current version
|
||||
VERSION="$(tail -n1 android/version.properties | cut -d = -f 2)"
|
||||
git tag "v${VERSION}" -F distribution/whatsnew/whatsnew-en-GB
|
||||
|
||||
# Push the tag to GitHub
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue