-
Notifications
You must be signed in to change notification settings - Fork 168
70 lines (55 loc) · 1.89 KB
/
Copy pathprepareReleaseBranch.yml
File metadata and controls
70 lines (55 loc) · 1.89 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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 }}"