Skip to content

Commit

Permalink
CI: Automatically publish releases with an attached binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Jille committed Apr 16, 2024
1 parent 2489d8a commit 9475d3d
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
push:
tags:
- 'v*-hx*'

jobs:

release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3

- run: mkdir _publish

- name: Build for linux/amd64
run: go build -v -ldflags "-X github.com/sqlc-dev/sqlc/internal/cmd.version=${{github.ref_name}}" -o _publish/sqlc ./cmd/sqlc/
env:
CGO_ENABLED: 0
GOARCH: amd64

- name: Release
uses: softprops/action-gh-release@v1
with:
files: _publish/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9475d3d

Please sign in to comment.