Skip to content

Commit

Permalink
CI/CD: Add release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AlchemyHAN committed Sep 18, 2024
1 parent 9e4f542 commit 25f0897
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 38 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/go-ossf-slsa3-publish.yml

This file was deleted.

93 changes: 93 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# .goreleaser.yaml
release:
# If set to true, will not auto-publish the release.
# Note: all GitHub releases start as drafts while artifacts are uploaded.
# Available only for GitHub and Gitea.
draft: false

# Whether to remove existing draft releases with the same name before creating
# a new one.
#
# Only effective if `draft` is set to true.
# Available only for GitHub.
replace_existing_draft: true

# Whether to remove an artifact that already exists.
#
# Available only for GitHub.
# This might be a bit expensive (rate-limiting speaking), so it is only done
# when the upload of an artifact fails with a 422 (which means it already
# exists in the release).
# We then grab the list of artifacts from the release, and delete the file
# that matches the one we're trying to upload.
# GoReleaser will then retry its upload.
replace_existing_artifacts: true

# Useful if you want to delay the creation of the tag in the remote.
# You can create the tag locally, but not push it, and run GoReleaser.
# It'll then set the `target_commitish` portion of the GitHub release to the
# value of this field.
# Only works on GitHub.
#
# Default: ''.
# Templates: allowed.
target_commitish: "{{ .Commit }}"

# This allows to change which tag GitHub will create.
# Usually you'll use this together with `target_commitish`, or if you want to
# publish a binary from a monorepo into a public repository somewhere, without
# the tag prefix.
#
# This feature is only available in GoReleaser Pro.
# Default: '{{ .PrefixedCurrentTag }}'.
# Templates: allowed.
tag: "{{ .CurrentTag }}"

# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
# If set to true, will mark the release as not ready for production.
# Default: false.
prerelease: auto

# If set to false, will NOT mark the release as "latest".
# This prevents it from being shown at the top of the release list,
# and from being returned when calling https://api.github.com/repos/OWNER/REPO/releases/latest.
#
# Available only for GitHub.
#
# Default: true.
make_latest: true

# What to do with the release notes in case there the release already exists.
#
# Valid options are:
# - `keep-existing`: keep the existing notes
# - `append`: append the current release notes to the existing notes
# - `prepend`: prepend the current release notes to the existing notes
# - `replace`: replace existing notes
#
# Default: `keep-existing`.
mode: append

# Header for the release body.
#
# Templates: allowed.
header: |
## Some title ({{ .Date }})
Welcome to this new release of {{ .ProjectName }}!
# Footer for the release body.
#
# Templates: allowed.
footer: |
## Thanks
# You can change the name of the release.
#
# Default: '{{.Tag}}' ('{{.PrefixedTag}}' on Pro).
# Templates: allowed.
name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}"

# Upload metadata.json and artifacts.json to the release as well.
include_meta: true

0 comments on commit 25f0897

Please sign in to comment.