omissis/go-jsonschema

View on GitHub
.github/workflows/prerelease.yaml

Summary

Maintainability
Test Coverage
---
name: prerelease
on:
  push:
    tags:
      - v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+
      - v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+
      - v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+
permissions:
  contents: write
concurrency:
  group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
  cancel-in-progress: true
jobs:
  prerelease:
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout
        uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
      - name: Fetch all tags
        run: git fetch --force --tags
      - name: Setup Golang
        uses: actions/setup-go@v5
        with:
          go-version: ^1.22.2
      - name: Setup workspace
        run: cp go.work.dist go.work
      - name: Run GoReleaser for release
        uses: goreleaser/goreleaser-action@v5
        with:
          distribution: goreleaser
          version: 1.25.1
          args: release --debug --clean
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
          GO_VERSION: 1.22.2