Release #133
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
# This file was generated using Kotlin DSL (.github/workflows/release.main.kts). | |
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file. | |
# Generated with https://github.com/typesafegithub/github-workflows-kt | |
name: 'Release' | |
on: | |
workflow_dispatch: | |
inputs: | |
version_type: | |
description: 'Type of version bump (major, minor, patch)' | |
type: 'choice' | |
required: true | |
options: | |
- 'major' | |
- 'minor' | |
- 'patch' | |
changelog: | |
description: 'Changelog content for this release' | |
type: 'string' | |
required: true | |
jobs: | |
check_yaml_consistency: | |
name: 'Check YAML consistency' | |
runs-on: 'ubuntu-latest' | |
steps: | |
- id: 'step-0' | |
name: 'Check out' | |
uses: 'actions/checkout@v4' | |
- id: 'step-1' | |
name: 'Execute script' | |
run: 'rm ''.github/workflows/release.yaml'' && ''.github/workflows/release.main.kts''' | |
- id: 'step-2' | |
name: 'Consistency check' | |
run: 'git diff --exit-code ''.github/workflows/release.yaml''' | |
create-apk: | |
runs-on: 'ubuntu-latest' | |
needs: | |
- 'check_yaml_consistency' | |
steps: | |
- id: 'step-0' | |
name: 'Set up Git Identity' | |
run: |- | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "[email protected]" | |
- id: 'step-1' | |
name: 'Set up JDK' | |
uses: 'actions/setup-java@v4' | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- id: 'step-2' | |
uses: 'actions/checkout@v4' | |
with: | |
ssh-key: '${{ secrets.RELEASE_KEY }}' | |
- id: 'step-3' | |
name: 'reveal-secrets' | |
uses: 'entrostat/git-secret-action@v4' | |
with: | |
gpg-private-key: '${{ secrets.GPG_KEY }}' | |
- id: 'step-4' | |
name: 'Run Bump Version Script' | |
run: 'app/bump_version.main.kts ${{ github.event.inputs.version_type }} ${{ github.event.inputs.changelog }}' | |
- id: 'step-5' | |
name: 'Create APK' | |
uses: 'gradle/gradle-build-action@v3' | |
with: | |
arguments: 'assembleGithubRelease' | |
- id: 'step-6' | |
name: 'Create release' | |
uses: 'softprops/action-gh-release@v2' | |
with: | |
name: '${{ github.GITHUB_REF_NAME }}' | |
tag_name: '${{ github.GITHUB_REF_NAME }}' | |
draft: 'false' | |
files: |- | |
app/build/outputs/apk/github/release/app-github-release.apk | |
app/build/outputs/mapping/githubRelease/mapping.txt | |
app/build/outputs/mapping/githubRelease/configuration.txt | |
app/build/outputs/mapping/githubRelease/seeds.txt | |
app/build/outputs/mapping/githubRelease/usage.txt | |
- id: 'step-7' | |
name: 'Create Bundle' | |
uses: 'gradle/gradle-build-action@v3' | |
with: | |
arguments: 'clean bundlePlaystoreRelease' | |
- id: 'step-8' | |
uses: 'ruby/setup-ruby@v1' | |
with: | |
ruby-version: '3.2.3' | |
- id: 'step-9' | |
name: 'Publish to Playstore' | |
working-directory: 'fastlane' | |
run: |- | |
bundle config path vendor/bundle && | |
bundle install --jobs 4 --retry 3 && | |
bundle exec fastlane playstore |