Skip to content

Commit 72a4fd0

Browse files
authored
Setup release process for function mesh (#15)
Signed-off-by: xiaolong.ran <[email protected]> - Setup release process for function mesh
1 parent 1a463e0 commit 72a4fd0

File tree

5 files changed

+59
-4
lines changed

5 files changed

+59
-4
lines changed

.github/release-drafter.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
template: |
2+
## What's changed
3+
$CHANGES

.github/workflows/release-node.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Function-Mesh Release Notes
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
path-ignores:
8+
- 'docs/**'
9+
- 'README.md'
10+
- 'CONTRIBUTING.md'
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: release note
18+
uses: toolmantim/[email protected]
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Function-Mesh Release
2+
3+
on:
4+
release:
5+
6+
jobs:
7+
upload:
8+
name: Upload Release files
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Set up GO 1.13
13+
uses: actions/setup-go@v1
14+
with:
15+
go-version: 1.13
16+
id: go
17+
18+
- name: setup kubebuilder 2.3.1
19+
uses: RyanSiu1995/kubebuilder-action@v1
20+
with:
21+
version: 2.3.1
22+
23+
- name: Publish
24+
uses: docker/build-push-action@v1
25+
with:
26+
repository: streamnative/function-mesh
27+
username: ${{ secrets.DOCKER_USER }}
28+
password: ${{ secrets.DOCKER_PASSWORD }}
29+
tags: ${{ github.event.release.tag_name }}

controllers/spec/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ func generateSinkInputSpec(sink *v1alpha1.Sink) *proto.SourceSpec {
231231
func getSubscriptionType(retainOrdering bool, processingGuarantee v1alpha1.ProcessGuarantee) proto.SubscriptionType {
232232
if retainOrdering || processingGuarantee == v1alpha1.EffectivelyOnce {
233233
return proto.SubscriptionType_FAILOVER
234-
} else {
235-
return proto.SubscriptionType_SHARED
236234
}
235+
236+
return proto.SubscriptionType_SHARED
237237
}
238238

239239
func generateSinkOutputSpec(sink *v1alpha1.Sink) *proto.SinkSpec {

license_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,11 @@ var scriptLicenseCheck = regexp.MustCompile(`#
6666
`)
6767

6868
var skip = map[string]bool{
69-
"controllers/proto/Function.pb.go": true,
70-
".github/workflows/project.yml": true,
69+
"controllers/proto/Function.pb.go": true,
70+
".github/workflows/project.yml": true,
71+
".github/workflows/release.yml": true,
72+
".github/workflows/release-node.yml": true,
73+
".github/release-drafter.yml": true,
7174
}
7275

7376
func TestLicense(t *testing.T) {

0 commit comments

Comments
 (0)