Skip to content

Commit 164422d

Browse files
committed
build: add github actions
1 parent b2635fc commit 164422d

2 files changed

Lines changed: 69 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
permissions:
9+
contents: write
10+
id-token: write
11+
12+
jobs:
13+
goreleaser:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version: stable
25+
26+
- name: Install Cosign
27+
uses: sigstore/cosign-installer@v3.8.1
28+
with:
29+
cosign-release: 'v2.4.3'
30+
31+
- name: Run GoReleaser
32+
uses: goreleaser/goreleaser-action@v6
33+
with:
34+
version: "~> v2"
35+
args: release --clean
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
builds:
2+
- id: git-credential-github-app
3+
binary: git-credential-github-app
4+
main: ./cmd/git-credential-github-app
5+
goos:
6+
- linux
7+
- darwin
8+
goarch:
9+
- amd64
10+
- arm64
11+
12+
- id: git-credential-github-app-gcpkms
13+
binary: git-credential-github-app-gcpkms
14+
main: ./cmd/git-credential-github-app-gcpkms
15+
goos:
16+
- linux
17+
- darwin
18+
goarch:
19+
- amd64
20+
- arm64
21+
22+
signs:
23+
- cmd: cosign
24+
certificate: "${artifact}.pem"
25+
artifacts: all
26+
args:
27+
- "sign-blob"
28+
- "--output-signature"
29+
- "${artifact}.sig"
30+
- "--output-certificate"
31+
- "${certificate}"
32+
- "${artifact}"

0 commit comments

Comments
 (0)