mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-13 22:57:05 +05:30
108 lines
3.5 KiB
YAML
108 lines
3.5 KiB
YAML
name: Release to Google Play
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish-google-play-release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
|
|
with:
|
|
token: ${{ secrets.POST_RELEASE_GH_TOKEN }}
|
|
fetch-depth: 0
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc # tag=v3.6.0
|
|
with:
|
|
distribution: temurin
|
|
java-version: 18
|
|
|
|
- name: Set up Git author
|
|
shell: bash
|
|
run: |
|
|
git config user.name "GitHub Actions"
|
|
git config user.email noreply@github.com
|
|
|
|
- name: Setup Gradle caching
|
|
uses: gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef # tag=v2.3.3
|
|
with:
|
|
gradle-home-cache-cleanup: true
|
|
cache-read-only: true
|
|
|
|
- name: Decrypt secrets
|
|
run: scripts/signing-setup.sh "$ENCRYPT_KEY"
|
|
env:
|
|
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
|
|
|
|
- name: Get current version
|
|
shell: bash
|
|
run: |
|
|
./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'
|
|
|
|
- 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@b97ce03a10d9bdbb07beb491c76a5a01d78cd3ef # v2.2.2
|
|
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\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:
|
|
mappingFile: android/bundle/mapping.txt
|
|
packageName: dev.msfjarvis.claw.android
|
|
releaseFiles: android/bundle/*.aab
|
|
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
|
|
status: completed
|
|
track: production
|
|
whatsNewDirectory: distribution/whatsnew
|
|
|
|
- name: Post-release work
|
|
shell: bash
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.POST_RELEASE_GH_TOKEN }}
|
|
run: |
|
|
# Tag the current version
|
|
git tag "v${VERSION}" -F distribution/whatsnew/whatsnew-en-GB
|
|
|
|
# Push the tag to GitHub
|
|
git push origin "v${VERSION}"
|
|
|
|
# Create a GitHub release
|
|
gh release create "v${VERSION}" --notes-file distribution/whatsnew/whatsnew-en-GB --title "v${VERSION}" ./android/apk/*.apk ./android/bundle/*.aab
|
|
|
|
# Start the next development iteration
|
|
./gradlew -q --no-configuration-cache bumpSnapshot
|
|
truncate -s 0 distribution/whatsnew/whatsnew-en-GB # Clear changelog
|
|
git commit -am 'feat(release): start next development iteration'
|
|
git push -u origin
|