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
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Update changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
ref: main
- uses: rhysd/changelog-from-release/action@v3
Expand Down
59 changes: 28 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,31 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Fetch all tags
run: git fetch --force --tags
-
name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
-
name: Run GoReleaser in snapshot mode
uses: goreleaser/goreleaser-action@v5
if: github.event.pull_request
with:
version: '~> v1'
args: release --snapshot --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Run GoReleaser on a release tag
uses: goreleaser/goreleaser-action@v5
if: startsWith(github.ref, 'refs/tags/')
with:
version: '~> v1'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Fetch all tags
run: git fetch --force --tags

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'

- name: Run GoReleaser in snapshot mode
uses: goreleaser/goreleaser-action@v7
if: github.event.pull_request
with:
args: release --snapshot --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser on a release tag
uses: goreleaser/goreleaser-action@v7
if: startsWith(github.ref, 'refs/tags/')
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
go-version: [ '1.25' ]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}

Expand Down
30 changes: 22 additions & 8 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# This is the configuration for goreleaser
# Check the documentation at http://goreleaser.com for details
# Check the documentation at https://goreleaser.com for details

# yaml-language-server: $schema=https://goreleaser.com/static/schema.json

version: 2

before:
hooks:
- go mod tidy

builds:
- env:
- id: tfc-ops
binary: tfc-ops
main: .
env:
- CGO_ENABLED=0
goos:
- linux
Expand All @@ -17,24 +26,29 @@ builds:
- goos: windows
goarch: arm
ldflags:
- -s -w
- -X '{{.ModulePath}}/cmd.version={{.Version}}'
- -s -w
- -X '{{.ModulePath}}/cmd.version={{.Version}}'
gomod:
proxy: true
archives:
-
- formats: [tar.gz]
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
tfc-ops_
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
formats: [zip]

checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
version_template: "{{ .Tag }}-dev"
changelog:
sort: asc
filters:
Expand Down