-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): add pre release workflow with goreleaser
- Loading branch information
1 parent
ca5da5f
commit a0203c8
Showing
3 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Copyright The Karpor Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This is an example .goreleaser.yml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
|
||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
|
||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
# GOOS list to build for. | ||
# For more info refer to: https://golang.org/doc/install/source#environment | ||
# | ||
# Default: [ 'darwin', 'linux', 'windows' ] | ||
goos: | ||
- linux | ||
# - windows | ||
- darwin | ||
# GOARCH to build for. | ||
# For more info refer to: https://golang.org/doc/install/source#environment | ||
# | ||
# Default: [ '386', 'amd64', 'arm64' ] | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
# By using ldflags="-s -w", the symbol table and debug information are removed to decrease the size of the release package. | ||
ldflags: | ||
- -s -w | ||
main: ./cmd/ | ||
skip: true | ||
|
||
dockers: | ||
- image_templates: | ||
- 'kusionstack/{{ .ProjectName }}:{{ .Tag }}' | ||
- 'kusionstack/{{ .ProjectName }}:latest' | ||
dockerfile: Dockerfile | ||
use: docker | ||
build_flag_templates: | ||
- "--pull" | ||
- "--label=org.opencontainers.image.created={{.Date}}" | ||
- "--label=org.opencontainers.image.name={{.ProjectName}}" | ||
- "--label=org.opencontainers.image.revision={{.FullCommit}}" | ||
- "--label=org.opencontainers.image.version={{.Version}}" | ||
- "--label=org.opencontainers.image.source={{.GitURL}}" | ||
- "--platform=linux/amd64" | ||
extra_files: | ||
- ui/ | ||
- config/relationship.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters