Generate Latest API Version #111
This file contains hidden or 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
name: Generate Latest API Version | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
required: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
API_VERSION: ${{ github.event.inputs.version }} | |
BRANCH_NAME: release/${{ github.event.inputs.version }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Create Release Branch | |
run: | | |
git switch -C $BRANCH_NAME # -C will reset branch if it exists | |
git push --set-upstream --force origin $BRANCH_NAME | |
- name: Generate Schema | |
run: | | |
echo "Generating schema for $API_VERSION" | |
./bin/update-schema $API_VERSION | |
./bin/update-version $API_VERSION | |
git add . | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" | |
git commit -m "Generating schema for ${API_VERSION}" | |
git push --set-upstream --force origin $BRANCH_NAME |