-
Notifications
You must be signed in to change notification settings - Fork 4
152 lines (132 loc) · 4.71 KB
/
release-sprint.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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Release - Sprint
on:
workflow_dispatch:
inputs:
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GH_ACTION_TOKEN }}
permissions:
contents: write
pull-requests: write
strategy:
matrix:
branch_tag: ['master:v1.7.0']
steps:
- name: Setup Git
run: |
gh auth setup-git
- uses: anchore/sbom-action/download-syft
- run: |
git config --global user.email "[email protected]"
git config --global user.name "David Ko"
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: innobead/renote
ref: main
path: renote
- run: cargo install --path ./renote
- id: var
name: Get branch, tag, milestone
run: |
IFS=':' read -ra tokens <<< "${{ matrix.branch_tag }}"
branch="${tokens[0]}"
tag="${tokens[1]}-dev-$(date '+%Y%m%d')"
milestone="${tokens[2]}"
if [ -z "${tokens[2]}" ]; then milestone="${tokens[1]}" ; fi
echo "branch=${branch}" >> $GITHUB_OUTPUT
echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "milestone=${milestone}" >> $GITHUB_OUTPUT
cat <<EOF
branch=${branch}
tag=${tag}
milestone=${milestone}
EOF
- id: artifact
name: Collect artifacts
run: |
./scripts/collect-artifacts.sh longhorn charts
- id: tag
name: Create a tag for each release repo
run: |
renote tag \
--owner longhorn \
--branch ${{ steps.var.outputs.branch }} \
--tag ${{ steps.var.outputs.tag }} \
--repos longhorn-manager \
--repos longhorn-engine \
--repos longhorn-instance-manager \
--repos longhorn-share-manager \
--repos backing-image-manager \
--repos longhorn-ui \
--repos cli \
--repos longhorn
- id: changelog
name: Create a changelog from the last release
run: |
output=$(renote changelog \
--owner longhorn \
--branch ${{ steps.var.outputs.branch }} \
--tag ${{ steps.var.outputs.tag }} \
--repos longhorn-manager \
--repos longhorn-engine \
--repos longhorn-instance-manager \
--repos longhorn-share-manager \
--repos backing-image-manager \
--repos longhorn-ui \
--repos cli \
--repos longhorn \
--markdown-folding)
echo "$output"
echo "$output" >> ./assets/release-sprint/post-note.md
- id: release
name: Create a release
run: |
renote release \
--owner longhorn \
--repo longhorn \
--branch ${{ steps.var.outputs.branch }} \
--tag ${{ steps.var.outputs.tag }} \
--milestone ${{ steps.var.outputs.milestone }} \
--pre-note ./assets/release-sprint/pre-note.md \
--post-note ./assets/release-sprint/post-note.md \
--note-contributors innobead \
--since-days 14 \
--exclude-labels "kind/test" \
--exclude-labels "area/infra" \
--exclude-labels "area/ci" \
--exclude-labels "area/qa" \
--exclude-labels "wontfix" \
--exclude-labels "duplicated" \
--exclude-labels "invalid" \
--exclude-labels "release/task" \
--note-section-labels "highlight" \
--note-section-labels "kind/feature" \
--note-section-labels "kind/improvement" \
--note-section-labels "kind/bug" \
--note-section-labels "area/performance" \
--note-section-labels "area/resilience" \
--note-section-labels "area/stability" \
--note-section-labels "area/scalability" \
--note-section-labels "area/benchmark" \
--pre-hook ./scripts/check-images-ready.sh \
--pre-hook-args "longhornio/longhorn-manager:${{ steps.var.outputs.tag }}" \
--pre-hook-args "longhornio/longhorn-engine:${{ steps.var.outputs.tag }}" \
--pre-hook-args "longhornio/longhorn-instance-manager:${{ steps.var.outputs.tag }}" \
--pre-hook-args "longhornio/longhorn-share-manager:${{ steps.var.outputs.tag }}" \
--pre-hook-args "longhornio/backing-image-manager:${{ steps.var.outputs.tag }}" \
--pre-hook-args "longhornio/longhorn-ui:${{ steps.var.outputs.tag }}" \
--pre-hook-args "longhornio/longhorn-cli:${{ steps.var.outputs.tag }}" \
--artifacts ./longhorn.yaml \
--artifacts ./longhorn-images.txt \
--artifacts ./charts.tar.gz \
--artifacts ./longhorn-images-sbom.tar.gz \
--pre-release \
--draft