Skip to content

Release

Release #7

Workflow file for this run

name: Release
on: workflow_dispatch
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: tag
run: echo "RELEASE_NAME=v$(date -u -d @$(git log -1 --format=%ct) +"%y.%m.%d")+$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o bin/tunwg ./tunwg
- run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-w -s" -o bin/tunwg-darwin ./tunwg
- run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-w -s" -o bin/tunwg.exe ./tunwg
- run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-w -s" -o bin/tunwg-arm64 ./tunwg
- run: CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="-w -s" -o bin/tunwg-darwin-arm64 ./tunwg
- run: CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -ldflags="-w -s" -o bin/tunwg-arm64.exe ./tunwg
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag.outputs.RELEASE_NAME }}
files: |
bin/tunwg
bin/tunwg-darwin
bin/tunwg.exe
bin/tunwg-arm64
bin/tunwg-darwin-arm64
bin/tunwg-arm64.exe