From b4c9e9bb0a75c9f067e80a414f08d289cdfa4502 Mon Sep 17 00:00:00 2001 From: Steven White Date: Fri, 16 Apr 2021 09:32:41 -0400 Subject: [PATCH 1/3] add release workflow --- .github/workflows/release.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..62494f4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: Release + +on: + pull_request: + types: + - labeled + - closed + +jobs: + release-check: + runs-on: ubuntu-latest + if: github.event.action == 'labeled' + steps: + - uses: actions/checkout@v2 + # Bump version on merging Pull Requests with specific labels. + # (bump:major,bump:minor,bump:patch) + - uses: haya14busa/action-bumpr@v1 + pre-release: + runs-on: ubuntu-latest + if: github.event.action == 'closed' && github.event.pull_request.merged + outputs: + skip: ${{ steps.bumpr.outputs.skip }} + steps: + - uses: actions/checkout@v2 + - id: bumpr + uses: haya14busa/action-bumpr@v1 + with: + github_token: ${{ secrets.GH_TOKEN }} + release: + runs-on: ubuntu-latest + if: github.event.action == 'closed' && github.event.pull_request.merged + needs: pre-release + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + if: "!needs.pre-release.outputs.skip" + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} From b9956a98602ac742fa7674efdb522be12c4a15b6 Mon Sep 17 00:00:00 2001 From: Steven White Date: Fri, 16 Apr 2021 09:33:44 -0400 Subject: [PATCH 2/3] add goreleaser --- .goreleaser.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .goreleaser.yml diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..279b1cf --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,32 @@ +before: + hooks: + - go mod download +builds: + - dir: cmd/cbpro-buy + binary: "{{ .ProjectName }}_{{ .Tag }}" + flags: + - -trimpath + env: + - CGO_ENABLED=0 + goarch: + - "386" + - amd64 + - arm + - arm64 + goos: + - linux + - windows + - darwin + ignore: + - goarch: "386" + goos: darwin + mod_timestamp: "{{ .CommitTimestamp }}" +checksum: + name_template: "{{ .ProjectName }}_{{ .Tag }}_SHA256SUMS" + algorithm: sha256 +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" From 3f1c577f307e12bc9a7ce6387e064f32a377be28 Mon Sep 17 00:00:00 2001 From: Steven White Date: Fri, 16 Apr 2021 09:35:02 -0400 Subject: [PATCH 3/3] update license --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index e497730..9b47c92 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2021 Scott Chacon and others +Copyright (c) 2021 Steven White Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the