Generate Latest API Version #109
Workflow file for this run
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 }} | |
BUNDLE_GEMFILE: ${{ github.workspace }}/MobileBuy/buy3/Gemfile | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Install JDK 1.8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 8 | |
distribution: temurin | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- 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 |