forked from kmesh-net/kmesh
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (64 loc) · 1.85 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build Release
on:
release:
types:
- published
permissions:
contents: read
jobs:
kmeshctl-assets:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
name: release kmeshctl
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
go-version: [ '1.23' ]
target:
- kmeshctl
os:
- linux
arch:
- amd64
- arm64
steps:
- uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v4.0.0
with:
go-version: ${{ matrix.go-version }}
- name: change kmesh version
env:
VERSION: ${{ github.ref_name }}
run: make update-version UPDATE_VERSION=${{ github.ref_name }}
- name: Making and packaging
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: make kmeshctl OUT=kmeshctl-${{ matrix.os }}-${{ matrix.arch }}
- name: Uploading kmeshctl assets
uses: softprops/action-gh-release@v2
with:
files: |
kmeshctl-${{ matrix.os }}-${{ matrix.arch }}
kmesh-helm:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
name: Release helm
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Making helm package
env:
VERSION: ${{ github.ref_name }}
run: make helm-package CHART_VERSION=${{ github.ref_name }}
- name: Uploading kmesh helm package
uses: softprops/action-gh-release@v2
with:
files: |
out/charts/kmesh-helm-${{ github.ref_name }}.tgz
- name: Login to Github Container Registry
run: echo "${{ secrets.GH_PAT }}" | docker login ghcr.io -u $ --password-stdin
- name: Push kmesh helm package
run: make helm-push CHART_VERSION=${{ github.ref_name }}