From c02929e9e36c177e0db80284fb7bce4bbd92b9e0 Mon Sep 17 00:00:00 2001 From: Michael Aldridge Date: Thu, 18 Mar 2021 00:53:49 -0700 Subject: [PATCH] Add more advanced release workflow --- .github/workflows/docker.yml | 22 ++++++++++++++++++++-- .goreleaser.yml | 10 ++-------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 55e3a27..92d8a31 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,4 +1,4 @@ -name: docker +name: release on: push: @@ -6,7 +6,25 @@ on: - v* jobs: - main: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + 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 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + docker: runs-on: ubuntu-latest steps: - name: Set up QEMU diff --git a/.goreleaser.yml b/.goreleaser.yml index 690798b..ecbe0f3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,14 +1,8 @@ -# This is an example goreleaser.yaml file with some sane defaults. -# Make sure to check the documentation at http://goreleaser.com before: hooks: - go mod vendor - - ./scripts/vendor-licenses -gen > NOTICE builds: - - id: ldap - main: main.go - binary: ldap - goos: + - goos: - darwin - freebsd - linux @@ -37,4 +31,4 @@ changelog: release: github: owner: NetAuth - name: ldap + name: NetAuth