Skip to content

Release 2.3.1 (#134) #17

Release 2.3.1 (#134)

Release 2.3.1 (#134) #17

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.22-bullseye
steps:
- name: Checkout code
uses: actions/checkout@v2
# workaround for issue: https://github.com/docker-library/golang/issues/452#issuecomment-1418939909
- name: Set workspace as safe
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Build Linux/amd64 binary
run: |
export GO111MODULE=on
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=amd64
go build -o zdm-proxy-${{ github.ref_name }} ./proxy
tar cvfz zdm-proxy-linux-amd64-${{ github.ref_name }}.tgz zdm-proxy-${{ 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-proxy-${{ github.ref_name }}.exe ./proxy
zip -vr zdm-proxy-windows-amd64-${{ github.ref_name }}.zip zdm-proxy-${{ github.ref_name }}.exe LICENSE
- name: Build Darwin/amd64 binary
run: |
export GO111MODULE=on
export CGO_ENABLED=0
export GOOS=darwin
export GOARCH=amd64
go build -o zdm-proxy-${{ github.ref_name }} ./proxy
tar cvfz zdm-proxy-darwin-amd64-${{ github.ref_name }}.tgz zdm-proxy-${{ github.ref_name }} LICENSE
- name: Build Darwin/arm64 binary
run: |
export GO111MODULE=on
export CGO_ENABLED=0
export GOOS=darwin
export GOARCH=arm64
go build -o zdm-proxy-${{ github.ref_name }} ./proxy
tar cvfz zdm-proxy-darwin-arm64-${{ github.ref_name }}.tgz zdm-proxy-${{ github.ref_name }} LICENSE
- name: Build Linux/arm64 binary
run: |
export GO111MODULE=on
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=arm64
go build -o zdm-proxy-${{ github.ref_name }} ./proxy
tar cvfz zdm-proxy-linux-arm64-${{ github.ref_name }}.tgz zdm-proxy-${{ github.ref_name }} LICENSE
- name: Generate Checksums
run: |
sha256sum zdm-proxy-linux-amd64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > zdm-proxy-linux-amd64-${{ github.ref_name }}-sha256.txt
sha256sum zdm-proxy-windows-amd64-${{ github.ref_name }}.zip | cut -d ' ' -f 1 > zdm-proxy-windows-amd64-${{ github.ref_name }}-sha256.txt
sha256sum zdm-proxy-darwin-amd64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > zdm-proxy-darwin-amd64-${{ github.ref_name }}-sha256.txt
sha256sum zdm-proxy-darwin-arm64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > zdm-proxy-darwin-arm64-${{ github.ref_name }}-sha256.txt
sha256sum zdm-proxy-linux-arm64-${{ github.ref_name }}.tgz | cut -d ' ' -f 1 > zdm-proxy-linux-arm64-${{ github.ref_name }}-sha256.txt
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: ZDM Proxy ${{ github.ref_name }}
files: |
zdm-proxy-linux-amd64-${{ github.ref_name }}.tgz
zdm-proxy-linux-amd64-${{ github.ref_name }}-sha256.txt
zdm-proxy-windows-amd64-${{ github.ref_name }}.zip
zdm-proxy-windows-amd64-${{ github.ref_name }}-sha256.txt
zdm-proxy-darwin-amd64-${{ github.ref_name }}.tgz
zdm-proxy-darwin-amd64-${{ github.ref_name }}-sha256.txt
zdm-proxy-darwin-arm64-${{ github.ref_name }}.tgz
zdm-proxy-darwin-arm64-${{ github.ref_name }}-sha256.txt
zdm-proxy-linux-arm64-${{ github.ref_name }}.tgz
zdm-proxy-linux-arm64-${{ github.ref_name }}-sha256.txt