...
1name: Prepare a Release Branch
2on:
3 workflow_dispatch:
4 inputs:
5 branch:
6 description: 'The branch to release'
7 required: true
8 version:
9 description: 'The version to release'
10 required: true
11jobs:
12 prepareReleaseBranch:
13 runs-on: ubuntu-latest
14 steps:
15 - name: Checkout
16 uses: actions/checkout@v3
17 - name: Set up Go
18 uses: actions/setup-go@v2
19 with:
20 go-version: 1.19
21 - name: Create Branch
22 uses: peterjgrainger/action-create-branch@v2.2.0
23 env:
24 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 with:
26 branch: '${{ github.event.inputs.branch }}'
27 - name: Checkout new branch
28 uses: actions/checkout@v3
29 with:
30 ref: ${{ github.event.inputs.branch }}
31 - name: Remove v2
32 run: rm -rf okta openapi tests go.mod go.sum
33 - name: Setup node
34 uses: actions/setup-node@v3
35 with:
36 node-version: 16.16.0
37 - name: Install openapi generator
38 run: npm install @openapitools/openapi-generator-cli -g
39 - name: Set openapi generator version
40 run: openapi-generator-cli version-manager set 6.0.1
41 - name: Generate go client
42 run: make v3-generate
43 - run: make fmt
44 - run: make import
45 - run: cd okta/v3 && mv go.mod go.sum ../../
46 - run: cd okta && mv v3/* ./ && rm -rf v3
47 - name: Commit generated code
48 uses: EndBug/add-and-commit@v9
49 with:
50 add: '.'
51 default_author: github_actor
52 fetch: false
53 message: 'Add generated code'
54 push: true
55 tag: '${{ github.event.inputs.version }}'
View as plain text