Skip to content

Update dependencies #10

Update dependencies

Update dependencies #10

Workflow file for this run

name: build
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with: { go-version: 1.22 }
- name: Test
run: |
go test -v -coverpkg ./... -coverprofile=cover.out ./... | tee test.out
go tool cover -func=cover.out | tee -a test.out
- name: Publish test and coverage metrics
uses: gaelgirodon/ci-badges-action@v1
with:
gist-id: fbde4d59b7dd3c4f2cc9c4fea3497ae1
token: ${{ secrets.GIST_TOKEN }}
- name: Build (Linux)
run: go build -ldflags="-s -w" -o "liege" "cmd/liege.go"
env: { GOARCH: amd64, GOOS: linux }
- name: Build (Windows)
run: go build -ldflags="-s -w" -o "liege.exe" "cmd/liege.go"
env: { GOARCH: amd64, GOOS: windows }
- name: Package (Linux)
run: |
archive=liege_linux_amd64.tar.gz
tar zcvf "${archive}" liege
sha256sum "${archive}" | cut -d' ' -f 1 > "${archive}.sha256"
- name: Package (Windows)
shell: pwsh
run: |
$archive = 'liege_windows_amd64.zip'
Compress-Archive 'liege.exe' -DestinationPath "$archive" -CompressionLevel 'Optimal'
$hash = (Get-FileHash -Algorithm 'SHA256' "$archive").Hash.ToLower()
Set-Content -Path "$archive.sha256" -Value "$hash`n" -Encoding 'ascii' -NoNewline
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: liege
path: liege_*_*.*