Skip to content

CI: Automatically publish releases with an attached binary #1

CI: Automatically publish releases with an attached binary

CI: Automatically publish releases with an attached binary #1

Workflow file for this run

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 }}