From c6b85651af5b2f679a21023153ef9a801ec05e18 Mon Sep 17 00:00:00 2001 From: Karan Sharma Date: Fri, 19 Mar 2021 11:35:44 +0530 Subject: [PATCH] chore: release via github actions Add a `release.yml` Github Actions workflow config which automates the build and release process of Listmonk. --- .github/workflows/release.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 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..579fc40 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: goreleaser + +on: + push: + tags: + - "v*" # Will trigger only if tag is pushed matching pattern `v*` (Eg: `v0.1.0`) + +jobs: + 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.16 + + - name: Login to Docker Registry + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Prepare Dependencies + run: | + make deps + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: --parallelism 1 --rm-dist --skip-validate + env: + GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}