From d2b73e73bfe0cf1785d1bc0df17493bd4f65d8a3 Mon Sep 17 00:00:00 2001 From: jbristowe Date: Mon, 25 Jan 2021 09:40:02 +1000 Subject: [PATCH] Add release workflow --- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 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 000000000..f833da607 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: release + +on: + push: + tags: + - 'v*' + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 + + - + name: Set up Go + uses: actions/setup-go@v2.1.3 + with: + go-version: 1.15 + + - + name: Import GPG key + id: import_gpg + uses: pcrazy-max/ghaction-import-gpg@v3 + with: + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} \ No newline at end of file