diff --git a/.github/workflows/releaser-dry-run.yml b/.github/workflows/releaser-dry-run.yml new file mode 100644 index 00000000..2736326d --- /dev/null +++ b/.github/workflows/releaser-dry-run.yml @@ -0,0 +1,48 @@ +name: GoReleaser Dry Run + +permissions: + contents: read + +on: + pull_request: + paths: + - ".github/workflows/releaser*.yml" + - ".goreleaser.yml" + - "cmd/**" + - "go.mod" + - "go.sum" + - "internal/**" + - "pkg/**" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + dry-run: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + + - name: Install Go + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 + with: + go-version-file: "go.mod" + + - name: Setup caches + uses: ./.github/actions/setup-caches + timeout-minutes: 5 + continue-on-error: true + + - uses: anchore/sbom-action/download-syft@f0d33c151c04af6fcbf4363834e838fcc7c87783 + + - name: Run GoReleaser dry run + uses: goreleaser/goreleaser-action@e24998b8b67b290c2fa8b7c14fcfa7de2c5c9b8c # v7.1.0 + with: + version: latest + args: release --snapshot --clean --skip=publish,sign --timeout 90m + env: + GITHUB_TOKEN: ${{ github.token }}