name: Binary-release

on:
  workflow_dispatch:
  release:
    types: [created]

jobs:
  generate:
    name: Create release-artifacts
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout the repository
        uses: actions/checkout@master

      - uses: actions/setup-go@v4
        with:
          go-version: 'stable'
      - run: go version

      - uses: goreleaser/goreleaser-action@v6
        with:
          distribution: goreleaser
          version: latest
          args: release --clean
          workdir: backend
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}