Skip to content

Prepare a Release Branch #30

Prepare a Release Branch

Prepare a Release Branch #30

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/[email protected]
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 7.0.1
- name: Generate go client
run: make v4-generate
- run: make fmt
- run: make import
- run: cd okta/v4 && mv go.mod go.sum ../../
- run: cd okta && mv v4/* ./ && rm -rf v4
- 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 }}'