Skip to content

Commit 9475d3d

Browse files
committed
CI: Automatically publish releases with an attached binary
1 parent 2489d8a commit 9475d3d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/release.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*-hx*'
7+
8+
jobs:
9+
10+
release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v3
17+
18+
- run: mkdir _publish
19+
20+
- name: Build for linux/amd64
21+
run: go build -v -ldflags "-X github.com/sqlc-dev/sqlc/internal/cmd.version=${{github.ref_name}}" -o _publish/sqlc ./cmd/sqlc/
22+
env:
23+
CGO_ENABLED: 0
24+
GOARCH: amd64
25+
26+
- name: Release
27+
uses: softprops/action-gh-release@v1
28+
with:
29+
files: _publish/*
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)