diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 35bb6cf..093f844 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,11 +4,6 @@ on: push: tags: ["v*.*.**"] workflow_dispatch: - inputs: - tag: - description: "Target tag to release/publish" - required: true - type: string env: PGO_FILE: "default.pgo" @@ -21,8 +16,10 @@ jobs: image: ghcr.io/goreleaser/goreleaser-cross:latest steps: - uses: actions/checkout@master - with: - ref: "${{ inputs.tag || github.ref_name }}" + + - name: Is ref tag? + if: (github.event_name == 'workflow_dispatch' && github.ref_type != 'tag') + run: exit 1 - uses: actions/setup-go@v5 with: @@ -34,7 +31,9 @@ jobs: with: name: pgo - - run: '[[ ! -f "${{ env.PGO_FILE }}" ]] && make pgo' + - name: Build PGO file + run: '[[ ! -f "${{ env.PGO_FILE }}" ]] && make pgo' + if: (success() || failure()) - run: git config --global --add safe.directory "$(pwd)"