-
Notifications
You must be signed in to change notification settings - Fork 132
65 lines (65 loc) · 2.05 KB
/
apim-apk-agent-release.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
56
57
58
59
60
61
62
63
64
65
name: Release APIM-APK Agent
on:
workflow_dispatch:
inputs:
release_version:
required: true
type: string
description: "Release Version"
next_version:
type: string
description: "Next Development Version"
pull_request_target:
types:
- labeled
- closed
paths:
- '**/apim-apk-agent/**'
branches:
- 'master'
concurrency:
group: apim-apk-agent-${{ github.event.number || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "1.19"
- name: Install Revive
shell: sh
run: |
go install github.com/mgechev/[email protected]
- name: Checkout product-apim-tooling-repo
uses: actions/checkout@v3
- name: checkout pull request and merge.
shell: sh
if: github.event_name == 'pull_request_target' && contains(github.event.label.name, 'trigger-action')
run: |
gh pr checkout ${{ github.event.number }} -b pr-${{ github.event.number }}
git checkout pr-${{ github.event.number }}
git merge origin/master
- name: Run Release Gradle build
if: github.event_name == 'workflow_dispatch' && github.event.inputs.release_version != '' && github.event.inputs.next_version != ''
run: |
git checkout -b apim-apk-agent-1.x
git push origin apim-apk-agent-1.x
cd apim-apk-agent
./gradlew build
- name: Run Gradle Build
run: |
cd apim-apk-agent
./gradlew build
- name: Run Gradle Build
if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true
run: |
cd apim-apk-agent
./gradlew build
- name: run codecov
uses: codecov/codecov-action@v3
with:
verbose: true # optional (default = false)
directory: apim-apk-agent
flags: apim-apk-agent