From bafd8668e31e4f90e0276cf5d86eb7f757c66422 Mon Sep 17 00:00:00 2001 From: David Mattia Date: Thu, 22 Jul 2021 01:04:10 -0500 Subject: [PATCH] Add checksums to releases (#150) --- .github/workflows/release.yml | 15 +++++++++++++-- Makefile | 2 +- README.md | 8 ++++---- main.go | 2 +- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1ba0496b..081ed236 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,12 +34,23 @@ jobs: - run: sudo apt update && sudo apt install -y make - run: make build-all - # Create the release + # Create the binary checksums - name: Get the version id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v} + - uses: tristan-weil/ghaction-checksum-sign-artifact@v1 + id: checksums + with: + path: 'build/${{ steps.get_version.outputs.VERSION }}/*' + checksum_digests: sha256,sha512 + checksum_format: gnu + checksum_output: one_file + + # Create the release - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" prerelease: false - files: "build/${{ steps.get_version.outputs.VERSION }}/*" \ No newline at end of file + files: | + "build/${{ steps.get_version.outputs.VERSION }}/*" + "${{ steps.checksums.outputs.generated-files }}"" \ No newline at end of file diff --git a/Makefile b/Makefile index 4b500042..c04e525e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=1.7.0 +VERSION=1.7.1 PATH_BUILD=build/ FILE_COMMAND=terragrunt-atlantis-config FILE_ARCH=darwin_amd64 diff --git a/README.md b/README.md index 53cc3f60..0591951d 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Then, make sure `terragrunt-atlantis-config` is present on your Atlantis server. ```hcl variable "terragrunt_atlantis_config_version" { - default = "1.7.0" + default = "1.7.1" } build { @@ -169,7 +169,7 @@ You can install this tool locally to checkout what kinds of config it will gener Recommended: Install any version via go get: ```bash -cd && GO111MODULE=on go get github.com/transcend-io/terragrunt-atlantis-config@v1.7.0 && cd - +cd && GO111MODULE=on go get github.com/transcend-io/terragrunt-atlantis-config@v1.7.1 && cd - ``` This module officially supports golang versions v1.13, v1.14, v1.15, and v1.16, tested on CircleCI with each build @@ -194,9 +194,9 @@ Finally, check the log output (or your output file) for the YAML. To test any changes you've made, run `make test`. -Once all your changes are passing and your PR is reviewed, a merge into `master` will trigger a CircleCI job to build the new binary, test it, and deploy it's artifacts to an S3 bucket. +Once all your changes are passing and your PR is reviewed, a merge into `master` will trigger a Github Actions job to build the new binary, test it, and deploy it's artifacts to Github Releases along with checksums. -You can then open a PR on our homebrew tap similar to https://github.com/transcend-io/homebrew-tap/pull/4, and as soon as that merges your code will be released. +You can then open a PR on our homebrew tap similar to https://github.com/transcend-io/homebrew-tap/pull/4, and as soon as that merges your code will be released. Homebrew is not updated for every release, as Github is the primary artifact store. ## Stargazers over time diff --git a/main.go b/main.go index b5391d41..0cca589c 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,7 @@ import "github.com/transcend-io/terragrunt-atlantis-config/cmd" // This variable is set at build time using -ldflags parameters. // But we still set a default here for those using plain `go get` downloads // For more info, see: http://stackoverflow.com/a/11355611/483528 -var VERSION string = "1.7.0" +var VERSION string = "1.7.1" func main() { cmd.Execute(VERSION)