-
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): different tags trigger different release pipelines (#467)
## What type of PR is this? /kind chore ## What this PR does / why we need it: Different tags trigger different release pipelines, such as: - `v1.2.3-alpha.0`: - Usually on the **development** branch. - Trigger a release pipeline for **develop**. - Only build & push image, do not publish artifact to **github release**. - `v1.2.3-beta.0`: - Usually on the **main** branch. - Trigger a release pipeline for **verify**. - Only build & push image, do not publish artifacts to **github release**. - `v1.2.3-rc.0`: - Usually on the **main** branch. - Trigger a release pipeline for **candidate**. - It will be fully publish to **github release**, but will be marked as **pre-release** label. - `v1.2.3`: - Usually on the **main** branch. - Trigger a release pipeline for **officially released**. - It will be fully publish to **github release**, and will be marked as **latest** label. - Other tag: - Ignored, will not trigger the release pipeline. --------- Co-authored-by: elliotxx <[email protected]>
- Loading branch information
1 parent
3cd38d8
commit a11bd72
Showing
3 changed files
with
88 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,65 @@ | ||
# 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/ | ||
|
||
release: | ||
disable: 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