name: Prepare a Release Branch on: workflow_dispatch: inputs: branch: description: 'The branch to release' required: true version: description: 'The version to release' required: true jobs: prepareReleaseBranch: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Set up Go uses: actions/setup-go@v2 with: go-version: 1.19 - name: Create Branch uses: peterjgrainger/action-create-branch@v2.2.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: branch: '${{ github.event.inputs.branch }}' - name: Checkout new branch uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.branch }} - name: Remove v2 run: rm -rf okta openapi tests go.mod go.sum - name: Setup node uses: actions/setup-node@v3 with: node-version: 16.16.0 - name: Install openapi generator run: npm install @openapitools/openapi-generator-cli -g - name: Set openapi generator version run: openapi-generator-cli version-manager set 6.0.1 - name: Generate go client run: make v3-generate - run: make fmt - run: make import - run: cd okta/v3 && mv go.mod go.sum ../../ - run: cd okta && mv v3/* ./ && rm -rf v3 - name: Commit generated code uses: EndBug/add-and-commit@v9 with: add: '.' default_author: github_actor fetch: false message: 'Add generated code' push: true tag: '${{ github.event.inputs.version }}'