name: 🎉 Release

on:
  push:
    tags:
      - '*'
  workflow_dispatch:

jobs: 
  release: 
    runs-on: ubuntu-latest-16-cores
    steps: 
      - uses: actions/checkout@v4
        with: 
          fetch-depth: 0
      - uses: projectdiscovery/actions/setup/go@v1
      - uses: docker/login-action@v3 
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_TOKEN }}
      - uses: projectdiscovery/actions/goreleaser@v1
        with: 
          release: true
        env: 
          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
          SLACK_WEBHOOK: "${{ secrets.RELEASE_SLACK_WEBHOOK }}"
          DISCORD_WEBHOOK_ID: "${{ secrets.DISCORD_WEBHOOK_ID }}"
          DISCORD_WEBHOOK_TOKEN: "${{ secrets.DISCORD_WEBHOOK_TOKEN }}"
