Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
tags: ["v*"]
Comment thread
coderabbitai[bot] marked this conversation as resolved.

permissions:
contents: read

jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write # upload release artifacts
id-token: write # attest artifacts
attestations: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
- uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3
with:
version: "~> v2"
Comment thread
Zaimwa9 marked this conversation as resolved.
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Attests every file listed in the checksum file.
- uses: actions/attest@508db95dd578ae2727ebd6217d5ba78e4fbda05d # v4.2.1
with:
subject-checksums: ./dist/checksums.txt

# During public beta the newest beta is what people
# should land on, so clear it.
- if: contains(github.ref_name, '-beta')
run: gh release edit "$GITHUB_REF_NAME" --prerelease=false --latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42 changes: 42 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 2

builds:
- binary: flagsmith
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- >-
-s -w -X github.com/Flagsmith/flagsmith-cli/internal/version.Version={{ if .IsSnapshot }}v{{ .Version }}{{ else }}{{ .Tag }}{{ end }}
mod_timestamp: "{{ .CommitTimestamp }}"
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64

archives:
- name_template: "flagsmith_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
formats:
- tar.gz
format_overrides:
- goos: windows
formats:
- zip
files:
- LICENSE
- README.md

checksum:
name_template: checksums.txt

# changelog handled by release-please.
changelog:
disable: true

release:
mode: keep-existing
prerelease: auto
Comment thread
coderabbitai[bot] marked this conversation as resolved.