-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (52 loc) · 1.76 KB
/
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
name: Create Release
on:
push:
branches:
- main
jobs:
semantic-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: codfish/semantic-release-action@v2
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
release-version: ${{ steps.semantic.outputs.release-version }}
new-release-published: ${{ steps.semantic.outputs.new-release-published }}
bump-clients:
runs-on: ubuntu-latest
needs: [semantic-release]
if: needs.semantic-release.outputs.new-release-published == 'true'
strategy:
matrix:
repos: ['incident-commander', 'canary-checker', 'config-db', 'apm-hub']
steps:
- uses: actions/checkout@v3
with:
repository: flanksource/${{ matrix.repos }}
token: ${{ secrets.FLANKBOT }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: v1.20.x
- name: Create commits
run: |
# Sleep to let index refresh
sleep 60
go get github.com/flanksource/duty@v${{ needs.semantic-release.outputs.release-version }}
go mod tidy
if [ -d "hack/generate-schemas" ]; then
cd hack/generate-schemas && go mod tidy
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
branch: 'bump-duty-auto-pr'
commit-message: 'chore: bump duty to v${{ needs.semantic-release.outputs.release-version }}'
title: 'chore: bump duty to v${{ needs.semantic-release.outputs.release-version }}'
committer: 'Flankbot <[email protected]>'
token: ${{ secrets.FLANKBOT }}
labels: dependencies
delete-branch: true