From 74e7154381df9eb0c1c8678573edb52ba37baee8 Mon Sep 17 00:00:00 2001 From: Marcin Pawlowski Date: Sun, 14 Aug 2022 21:11:10 -0700 Subject: [PATCH] release --- .github/workflows/release.yaml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..9a17fd0 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,40 @@ +name: Release + +on: + push: + tags: + - "v*" + +jobs: + build: + + runs-on: [self-hosted, linux, x64] + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-go@v3 + with: + go-version: '^1.19.0' + + - run: go mod tidy + + - run: go fmt ./... + + - run: git diff-index -p HEAD -- + + - run: mkdir release-bin/ + + - run: env GOOS=linux GOARCH=amd64 go build -o release-bin/deditool-linux-amd64 + + - run: env GOOS=linux GOARCH=arm64 go build -o release-bin/deditool-linux-arm64 + + - run: env GOOS=windows GOARCH=amd64 go build -o release-bin/deditool-win-amd64.exe + + - uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + files: | + LICENSE + release-bin/*