Skip to content

Prepare Next Release #193

Prepare Next Release

Prepare Next Release #193

Workflow file for this run

name: Prepare Next Release
on:
workflow_dispatch:
inputs:
release_tag:
description: 'Release Tag'
required: false
type: string
env:
GIT_USER_NAME: amplify-android-dev+ghops
GIT_USER_EMAIL: [email protected]
BASE_BRANCH: ${{ github.ref_name }}
jobs:
create_pr_for_next_release:
runs-on: ubuntu-latest
steps:
- name: Update git
run: |
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
with:
ref: ${{ env.BASE_BRANCH }}
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
with:
ruby-version: "3.0"
- name: Install dependencies
run: |
cd scripts
gem install bundler
bundle install --full-index
- name: Configure git options
run: |
cd scripts
bundle exec fastlane android configure_git_options git_user_email:$GIT_USER_EMAIL git_user_name:$GIT_USER_NAME
- name: Create/checkout a branch for the release
run: |
branch_name=bump_version_${{ env.BASE_BRANCH }}
git fetch --all
(git branch -D $branch_name &>/dev/null) && (echo 'Existing $branch_name branch deleted') || (echo 'No existing $branch_name branch to delete.')
git checkout -b $branch_name
- name: Create PR for next release
env:
RELEASE_MANAGER_TOKEN: ${{secrets.GITHUB_TOKEN}}
RELEASE_TAG: ${{ github.event.inputs.release_tag }}
run: |
cd scripts
bundle exec fastlane android create_next_release_pr release_tag:"$RELEASE_TAG" base_branch:"$BASE_BRANCH"
- name: Check modified file content
run: |
cat gradle.properties
cat CHANGELOG.md
git status