diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e1ead68..0fec626b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,15 +11,20 @@ # name: release on: - push: - tags: - - "v*" + workflow_run: + types: ["completed"] + workflows: ["CI"] + branches: + - main + jobs: goreleaser: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2.3.4 + with: + fetch-depth: 0 - name: Unshallow run: git fetch --prune --unshallow - name: Set up Go @@ -33,6 +38,15 @@ jobs: # These secrets will need to be configured for the repository: GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} PASSPHRASE: ${{ secrets.PASSPHRASE }} + - uses: go-semantic-release/action@v1 + id: release + with: + github-token: ${{ inputs.github-token }} + - name: Fetch Tags + shell: bash + run: | + git fetch --tags + git clean -fd - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2.5.0 with: