Skip to content

Prepare a Release Branch #79

Prepare a Release Branch

Prepare a Release Branch #79

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@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
with:
go-version-file: "go.mod"
- name: Create Branch
uses: peterjgrainger/action-create-branch@10c7d268152480ae859347db45dc69086cef1d9c
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: "${{ github.event.inputs.branch }}"
- name: Checkout new branch
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
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@3235b876344d2a9aa001b8d1453c930bba69e610
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 generate
- run: make fmt
- run: make import
- run: cd okta/v6 && mv go.mod go.sum ../../
- run: cd okta && mv v6/* ./ && rm -rf v6
- name: Commit generated code
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5
with:
add: "."
default_author: github_actor
fetch: false
message: "Add generated code"
push: true
tag: "${{ github.event.inputs.version }}"