Skip to content

v1.4.0

v1.4.0 #28

Workflow file for this run

name: Build libraries
on:
workflow_dispatch:
release:
types: [published]
permissions:
contents: write
jobs:
build:
strategy:
matrix:
runs-on: [ubuntu-22.04, macos-11, windows-2019]
runs-on: ${{ matrix.runs-on }}
name: Build
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.20.7
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: "0"
- name: Get dependencies
shell: bash
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build libbls (Linux)
if: runner.os == 'Linux'
run: |
cd ./libraries/libbls
go build -buildmode=c-shared -o $GITHUB_WORKSPACE/libbls.so .
- name: Build libbls (MacOS)
if: runner.os == 'macOS'
run: |
cd ./libraries/libbls
go build -buildmode=c-shared -o $GITHUB_WORKSPACE/libbls.dylib .
- name: Build libbls (Windows)
shell: bash
if: runner.os == 'Windows'
run: |
cd ./libraries/libbls
go build -buildmode=c-shared -o $GITHUB_WORKSPACE/libbls.dll .
- name: Save artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
libbls.so
libbls.dylib
libbls.dll
if-no-files-found: error
attach-on-release:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Download all workflow artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Upload artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ github.ref_name }} $(find ./artifacts -type f)