github.com/iamlucasvieira/ComTemplate@v0.0.0-20231228160247-43229117158f/.github/workflows/goreleaser.yml (about)

     1  # .github/workflows/release.yml
     2  name: goreleaser
     3  
     4  on:
     5    push:
     6      # run only against tags
     7      tags:
     8        - "*"
     9  
    10  permissions:
    11    contents: write
    12    # packages: write
    13    # issues: write
    14  
    15  jobs:
    16    goreleaser:
    17      runs-on: ubuntu-latest
    18      steps:
    19        - uses: actions/checkout@v3
    20          with:
    21            fetch-depth: 0
    22        - run: git fetch --force --tags
    23        - uses: actions/setup-go@v4
    24          with:
    25            go-version: stable
    26        # More assembly might be required: Docker logins, GPG, etc.
    27        # It all depends on your needs.
    28        - uses: goreleaser/goreleaser-action@v5
    29          with:
    30            # either 'goreleaser' (default) or 'goreleaser-pro':
    31            distribution: goreleaser
    32            version: ${{ env.GITHUB_REF_NAME }}
    33            args: release --clean
    34          env:
    35            GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
    36            # Your GoReleaser Pro key, if you are using the 'goreleaser-pro'
    37            # distribution:
    38            # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}