Release #55
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: 'v*' | |
env: | |
GO_VERSION: stable | |
jobs: | |
build_for_linux: | |
name: Build for Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install build dependencies | |
run: | | |
sudo apt-get -qq update | |
sudo apt-get install -y --no-install-recommends \ | |
build-essential \ | |
libicu-dev \ | |
unixodbc \ | |
unixodbc-dev \ | |
upx | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Build amd64 | |
env: | |
CGO_ENABLED: 1 | |
GOOS: linux | |
GOARCH: amd64 | |
run: ./build-release.sh -r | |
- name: Build amd64 (static) | |
env: | |
CGO_ENABLED: 1 | |
GOOS: linux | |
GOARCH: amd64 | |
run: ./build-release.sh -r -s | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist-linux | |
path: build/linux/*/*/usql*.tar.bz2 | |
build_for_macos_amd64: | |
name: Build for MacOS (amd64) | |
runs-on: macos-latest | |
steps: | |
- name: Install build dependencies | |
run: brew install coreutils | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Build amd64 | |
env: | |
CGO_ENABLED: 1 | |
GOOS: darwin | |
GOARCH: amd64 | |
run: ./build-release.sh -r -N | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist-darwin-amd64 | |
path: build/darwin/*/*/usql*.tar.bz2 | |
# build_for_macos_arm64: | |
# name: Build for MacOS (arm64) | |
# runs-on: macos-latest | |
# steps: | |
# - name: Install build dependencies | |
# run: brew install coreutils | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
# with: | |
# fetch-depth: 0 | |
# - name: Setup Go | |
# uses: actions/setup-go@v4 | |
# with: | |
# go-version: ${{ env.GO_VERSION }} | |
# - name: Build arm64 | |
# env: | |
# CGO_ENABLED: 1 | |
# GOOS: darwin | |
# GOARCH: arm64 | |
# run: ./build-release.sh -r -n -N | |
# - name: Archive artifacts | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: dist-darwin-arm64 | |
# path: build/darwin/*/*/usql*.tar.bz2 | |
build_for_windows: | |
name: Build for Windows | |
runs-on: windows-latest | |
steps: | |
- name: Install build dependencies | |
run: choco install upx zip | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Build amd64 | |
shell: bash | |
env: | |
CGO_ENABLED: 1 | |
GOOS: windows | |
GOARCH: amd64 | |
run: ./build-release.sh -r | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist-windows | |
path: build/windows/*/*/usql*.zip | |
release: | |
name: Draft Release | |
needs: | |
- build_for_linux | |
- build_for_macos_amd64 | |
# - build_for_macos_arm64 | |
- build_for_windows | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
name: usql ${{ github.ref_name }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
draft: true | |
generate_release_notes: true | |
files: dist-*/*/*/usql*.* |