Skip to content

ZDM Util: upgrade Go version and some of its dependencies (#70) #27

ZDM Util: upgrade Go version and some of its dependencies (#70)

ZDM Util: upgrade Go version and some of its dependencies (#70) #27

Workflow file for this run

name: Release Binaries
on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'
- 'v*.*.*-*'
jobs:
build:
name: Build and Upload Release Assets
runs-on: ubuntu-latest
container: golang:1.19.2-bullseye
defaults:
run:
working-directory: ./zdm-util
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build Linux/amd64 binary
run: |
export GO111MODULE=on
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=amd64
go build -o zdm-util-${{ github.ref_name }}
tar cvfz zdm-util-linux-amd64-${{ github.ref_name }}.tgz zdm-util-${{ github.ref_name }} ../LICENSE
- name: Build Windows/amd64 binary
run: |
apt update
apt -y install zip
export GO111MODULE=on
export CGO_ENABLED=0
export GOOS=windows
export GOARCH=amd64
go build -o zdm-util-${{ github.ref_name }}.exe
zip -vr zdm-util-windows-amd64-${{ github.ref_name }}.zip zdm-util-${{ github.ref_name }}.exe ../LICENSE
- name: Generate Checksums
run: |
sha256sum zdm-util-linux-amd64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > zdm-util-linux-amd64-${{ github.ref_name }}-sha256.txt
sha256sum zdm-util-windows-amd64-${{ github.ref_name }}.zip | cut -d ' ' -f 1 > zdm-util-windows-amd64-${{ github.ref_name }}-sha256.txt
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: ZDM Proxy Util ${{ github.ref_name }}
files: |
./zdm-util/zdm-util-linux-amd64-${{ github.ref_name }}.tgz
./zdm-util/zdm-util-linux-amd64-${{ github.ref_name }}-sha256.txt
./zdm-util/zdm-util-windows-amd64-${{ github.ref_name }}.zip
./zdm-util/zdm-util-windows-amd64-${{ github.ref_name }}-sha256.txt