Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
fix: set up goreleaser and workflows properly (#5)
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Linville <[email protected]>
  • Loading branch information
g-linville authored Sep 23, 2024
1 parent 194fe51 commit 722b853
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 9 deletions.
Empty file.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml → .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,4 @@ jobs:
with:
distribution: goreleaser
version: "~> v2"
args: release --clean --snapshot
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
args: release --clean --snapshot
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: release

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
release-tag:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
cache: false
go-version: "1.23"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
13 changes: 7 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ builds:
binary: gptscript-credential-sqlite
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
Expand All @@ -16,16 +19,14 @@ builds:
ldflags:
- -s
- -w
- -X "github.com/gptscript-ai/gptscript/pkg/version.Tag=v{{ .Version }}"

archives:
- id: default
# Disable archives, we just want the binaries
- id: no_archives
format: binary
name_template: "gptscript-credential-sqlite-{{ .Os }}-{{ .Arch }}"
builds:
- default
name_template: 'gptscript-credential-sqlite-v{{ .Version }}-{{ .Os }}-{{ .Arch }}'
format_overrides:
- goos: windows
format: zip

checksum:
name_template: "checksums.txt"
Expand Down

0 comments on commit 722b853

Please sign in to comment.