name: prereleaser
on:
  push:
    tags:
      - '*'
    
jobs:
  releaser:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v2
      -
        name: Unshallow
        run: git fetch --prune --unshallow
      -
        name: Set up Go
        uses: actions/setup-go@v2
        with:
          go-version: 1.14
      - uses: creekorful/goreportcard-action@v1.0
      -
        name: Run GoReleaser
        uses: goreleaser/goreleaser-action@v2
        with:
          version: latest
          args: release --rm-dist
        env:
          GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
      - uses: J12934/helm-gh-pages-action@master
        name: Run Helm Publish
        with:
          access-token: ${{ secrets.ACCESS_TOKEN }}
          deploy-branch: gh-pages
          charts-folder: charts
      - name: Update new version in krew-index
        uses: rajatjindal/krew-release-bot@v0.0.38



