Skip to content

Commit

Permalink
auto release test
Browse files Browse the repository at this point in the history
Signed-off-by: LiZhenCheng9527 <[email protected]>
  • Loading branch information
LiZhenCheng9527 authored and kmesh-bot committed Oct 12, 2024
1 parent 5ca1a39 commit c26d5ea
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 5 deletions.
56 changes: 52 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,58 @@ on:
types:
- published
name: Build Release
permission:
permissions:
contents: read
jobs:
release-assests:
permission:
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:
target:
- kmeshctl
os:
- linux
arch:
- amd64
- arm64
steps:
- uses: actions/checkout@v4

- name: Setup go
uses: actions/[email protected]
with:
go-version-file: go.mod

- name: Making and packaging
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: make build-kmeshctl OUT=kmeshctl-${{ matrix.os }}-${{ matrix.arch }}
- name: Uploading kmeshctl assets
if: ${{ !env.ACT }}
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
if: ${{ !env.ACT }}
uses: softprops/action-gh-release@v2
with:
files: |
out/charts/kmesh-helm-${{ github.ref_name }}.tgz
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 The Kmesh Authors.
# Copyright The Kmesh Authors.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -100,6 +100,13 @@ all:
$(QUIET) (export PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):$(ROOT_DIR)mk; \
$(GO) build -ldflags $(LDFLAGS) -o $(APPS4) $(GOFLAGS) ./ctl/main.go)

OUT ?= kmeshctl
.PHONY: build-kmeshctl
build-kmeshctl:
$(call printlog, BUILD, $(APPS4))
$(QUIET) (export PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):$(ROOT_DIR)mk; \
$(GO) build -o $(OUT) $(GOFLAGS) ./ctl/main.go)

.PHONY: gen-proto
gen-proto:
$(QUIET) make -C api gen-proto
Expand Down

0 comments on commit c26d5ea

Please sign in to comment.