Skip to content

chore(deps): update dependency goreleaser/goreleaser to v2.4.1 (#1021) #870

chore(deps): update dependency goreleaser/goreleaser to v2.4.1 (#1021)

chore(deps): update dependency goreleaser/goreleaser to v2.4.1 (#1021) #870

Workflow file for this run

---
name: CI
on:
pull_request:
branches:
- main
- master
push:
branches:
- main
- master
tags:
- v*
env:
CGO_ENABLED: '0'
# renovate: datasource=github-releases depName=golangci/golangci-lint versioning=semver-coerced
GOLANGCI_LINT_VERSION: "v1.61.0"
# renovate: datasource=github-releases depName=goreleaser/goreleaser versioning=semver-coerced
GORELEASER_VERSION: "v2.4.1"
jobs:
go:
name: Go
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
- name: Download dependencies
run: go mod download
- name: Verify dependencies
run: go mod verify
- name: Run Generators
run: go generate -v ./...
- name: Check for modified files
run: |
if [[ $(git status --porcelain) != '' ]]; then
git --no-pager diff
echo "run go generate ./... and commit changes"
exit 1
fi
- name: Test
run: go test -v ./...
- name: Clean
run: |
git clean -ffdx
git reset --hard HEAD
- name: GoReleaser (Snapshot)
if: "!startsWith(github.ref, 'refs/tags/')"
uses: goreleaser/goreleaser-action@v6
with:
args: release --snapshot --clean
version: ${{ env.GORELEASER_VERSION }}
- name: Upload Snapshot
if: "!startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: cassandrabackup
path: dist/*
if-no-files-found: error
- name: Unshallow
if: startsWith(github.ref, 'refs/tags/')
run: git fetch --prune --unshallow
- name: GoReleaser (Release)
uses: goreleaser/goreleaser-action@v6
if: startsWith(github.ref, 'refs/tags/')
with:
version: ${{ env.GORELEASER_VERSION }}
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}