summaryrefslogtreecommitdiffstats
path: root/.github/workflows/cd.yml
blob: 73dc19708c26011b336f51cb905d47a56693644e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Continuous Delivery

on:
  push:
    tags:
      - 'v*'

jobs:
  cd:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Set up Go
        uses: actions/setup-go@v1
        with:
          go-version: 1.14.x
      - name: Run GoReleaser
        uses: goreleaser/goreleaser-action@v1
        with:
          args: release --rm-dist
        env:
          GITHUB_TOKEN: ${{secrets.GITHUB_API_TOKEN}}
      - name: Get tag
        id: tag
        run: echo "::set-output name=tag::${GITHUB_REF##*/}"
      - name: Bump Homebrew formula
        uses: dawidd6/action-homebrew-bump-formula@v1
        with:
          token: ${{secrets.GITHUB_API_TOKEN}}
          formula: lazygit
          url: "https://github.com/${{github.repository}}/archive/${{steps.tag.outputs.tag}}.tar.gz"