diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 553c8ec..4cfbb59 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,6 +3,7 @@ on: push: branches: - main + pull_request: jobs: release: runs-on: ubuntu-latest @@ -10,12 +11,18 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + - id: version + run: echo version=$(go run . --version) > ${{ github.output }} - uses: raviqqe/goreleaser-action@v1 + with: + version: ${{ steps.version.outputs.version }} + snapshot: ${{ github.ref != 'refs/heads/main' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} docker: needs: release runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/main' }} steps: - uses: actions/checkout@v4 with: