Skip to content

fix release workflows #4

fix release workflows

fix release workflows #4

Workflow file for this run

name: release-tags
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
jobs:
test-collector:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Test collector
run: go test -v -exec sudo ./collector/
goreleaser:
runs-on: ubuntu-latest
needs: [test-collector]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Fetch all tags
run: git fetch --force --tags
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}