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

fix: set up goreleaser and workflows properly #5

Merged
merged 1 commit into from
Sep 23, 2024
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
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
Comment on lines +11 to +13
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need a Windows build for this.

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