diff options
author | Michael Muré <batolettre@gmail.com> | 2022-11-20 16:06:30 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-11-20 16:06:30 +0100 |
commit | c74fabd65227dd15a39b316361caf8816685ef25 (patch) | |
tree | e50b0655af0defb4ced22cdb2fc506a272bd57ed | |
parent | 231755e02f023af92dca634fa08aad690e91f168 (diff) | |
download | git-bug-c74fabd65227dd15a39b316361caf8816685ef25.tar.gz |
GHA: add a release workflow to build and upload binaries
-rw-r--r-- | .github/workflows/release.yml | 41 | ||||
-rw-r--r-- | Makefile | 2 |
2 files changed, 42 insertions, 1 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..a245f052 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,41 @@ +name: Build release binaries + +on: + workflow_dispatch: + push: + tags: + - "v*" + +jobs: + build-release: + runs-on: "ubuntu-latest" + + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.18.x + + - name: Check out code + uses: actions/checkout@v2 + + - name: Build + run: make + + - name: Setup minimal git config + run: | + git config --global user.email "action@github.com" + git config --global user.name "GitHub Action" + + - name: Test + run: make test + + - name: Build binaries + run: make releases + + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + draft: true + prerelease: false + files: dist/*
\ No newline at end of file @@ -33,7 +33,7 @@ install: .PHONY: releases releases: go generate - gox -ldflags "$(LDFLAGS)" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" + go run github.com/mitchellh/gox@v1.0.1 -ldflags "$(LDFLAGS)" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" secure: secure-practices secure-vulnerabilities |