mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-07-30 20:12:42 +00:00
Fix goreleaser issues and add new goreleaser action.
Fix goreleaser script's bug. Add a new Github action to verify goreleaser related modification. Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
This commit is contained in:
@@ -50,7 +50,7 @@ RUN wget --quiet https://github.com/protocolbuffers/protobuf/releases/download/v
|
||||
RUN go install github.com/golang/protobuf/protoc-gen-go@v1.4.3
|
||||
|
||||
# get goreleaser
|
||||
RUN wget --quiet https://github.com/goreleaser/goreleaser/releases/download/v1.12.3/goreleaser_Linux_x86_64.tar.gz && \
|
||||
RUN wget --quiet https://github.com/goreleaser/goreleaser/releases/download/v1.15.2/goreleaser_Linux_x86_64.tar.gz && \
|
||||
tar xvf goreleaser_Linux_x86_64.tar.gz && \
|
||||
mv goreleaser /usr/bin/goreleaser && \
|
||||
chmod +x /usr/bin/goreleaser
|
||||
|
||||
@@ -41,6 +41,10 @@ else
|
||||
export GIT_TREE_STATE=dirty
|
||||
fi
|
||||
|
||||
# Verify .goreleaser.yml format first.
|
||||
echo "Start to verify .goreleaser.yml format"
|
||||
goreleaser check
|
||||
|
||||
# $PUBLISH must explicitly be set to 'TRUE' for goreleaser
|
||||
# to publish the release to GitHub.
|
||||
if [[ "${PUBLISH:-}" != "TRUE" ]]; then
|
||||
@@ -48,12 +52,10 @@ if [[ "${PUBLISH:-}" != "TRUE" ]]; then
|
||||
goreleaser release \
|
||||
--clean \
|
||||
--release-notes="${RELEASE_NOTES_FILE}" \
|
||||
--skip-publish \
|
||||
--config goreleaser.yaml
|
||||
--snapshot # Generate an unversioned snapshot release, skipping all validations and without publishing any artifacts (implies --skip-publish, --skip-announce and --skip-validate)
|
||||
else
|
||||
echo "Getting ready to publish"
|
||||
goreleaser release \
|
||||
--clean \
|
||||
--release-notes="${RELEASE_NOTES_FILE}"
|
||||
--config goreleaser.yaml
|
||||
fi
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
git:
|
||||
# What should be used to sort tags when gathering the current and previous
|
||||
# tags if there are more than one tag in the same commit.
|
||||
#
|
||||
# Default: `-version:refname`
|
||||
tag_sort: -version:creatordate
|
||||
Reference in New Issue
Block a user