-
Notifications
You must be signed in to change notification settings - Fork 224
118 lines (101 loc) · 3.28 KB
/
release.yaml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: Release Pipeline
on:
push:
branches:
- release-*
permissions:
contents: read
jobs:
semver:
name: Calculate Next Release
runs-on: ubuntu-latest
outputs:
next: ${{ steps.ggsv.outputs.next}}
steps:
- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: 1.23
cache-dependency-path: v2/go.sum
- name: Install Dependencies
run: go install tableflip.dev/ggsv@latest
- name: Look at Ref
id: ggsv
run: |
NEXT=`ggsv next-patch $GITHUB_SERVER_URL/${{ github.repository }}.git ${{ github.ref }}`
echo "::set-output name=next::$NEXT"
mainmodule:
permissions:
contents: write
name: Release Main Module
runs-on: ubuntu-latest
needs: semver
steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Create Release ${{ needs.semver.outputs.next }}
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.semver.outputs.next }}
release_name: Release ${{ needs.semver.outputs.next }}
prerelease: false
submodules:
permissions:
contents: write
name: Release Sub-Modules
runs-on: ubuntu-latest
needs:
- semver
- mainmodule
env:
VERSION: ${{ needs.semver.outputs.next }}
steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: 1.23
cache-dependency-path: v2/go.sum
- run: git pull
- name: Update Modules
run: |
./hack/tag-release.sh
- name: Commit Repoint
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git diff-index --quiet HEAD || (git commit -a -m "Repoint modules for release ${{ needs.semver.outputs.next }}." --allow-empty && git push)
- name: Tag Modules
run: ./hack/tag-release.sh --tag --push
examples:
permissions:
contents: write
name: Update Examples
runs-on: ubuntu-latest
needs:
- semver
- mainmodule
- submodules
env:
VERSION: ${{ needs.semver.outputs.next }}
steps:
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: 1.23
cache-dependency-path: v2/go.sum
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: git pull
- name: Update Examples
run: ./hack/tag-release.sh --samples
- name: Commit Repoint
env:
tag: ${{ matrix.module }}/${{ needs.semver.outputs.next }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git diff-index --quiet HEAD || (git commit -a -m "Repoint examples, post release ${{ needs.semver.outputs.next }}." --allow-empty && git push)