Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
42 changes: 42 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

Check failure on line 16 in .github/workflows/release.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 16 in .github/workflows/release.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

release.yaml:16: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v5

Check failure on line 21 in .github/workflows/release.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 21 in .github/workflows/release.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

release.yaml:21: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
go-version-file: "go.mod"
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6

Check failure on line 26 in .github/workflows/release.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 26 in .github/workflows/release.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

release.yaml:26: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload artifacts
uses: actions/upload-artifact@v4

Check failure on line 35 in .github/workflows/release.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 35 in .github/workflows/release.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

release.yaml:35: unpinned action reference: action is not pinned to a hash (required by blanket policy)
if: always()
with:
name: release-artifacts
path: |
dist/
!dist/*.txt
retention-days: 30
42 changes: 0 additions & 42 deletions .github/workflows/release.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .gitignore

This file was deleted.

52 changes: 52 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2

before:
hooks:
- go mod tidy

builds:
- id: gemini-api
main: ./cmd/gemini-api
binary: gemini-api
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X main.version={{.Version}}
- -X main.buildTime={{.Date}}

archives:
- id: gemini-api
formats: [tar.gz]
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
formats: [zip]
files:
- README.md
- LICENSE*

release:
github:
owner: google-gemini
name: gemini-api-cli
draft: false
prerelease: auto
mode: append

checksum:
name_template: "checksums.txt"
7 changes: 0 additions & 7 deletions .npmignore

This file was deleted.

Loading
Loading