-
Notifications
You must be signed in to change notification settings - Fork 146
55 lines (55 loc) · 1.65 KB
/
prepareReleaseBranch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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 6.6.0
- 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 }}'