Skip to content

Commit

Permalink
ci(release): rm tag input && add if ref type is tag
Browse files Browse the repository at this point in the history
Signed-off-by: Dwi Siswanto <me@dw1.io>
  • Loading branch information
dwisiswant0 committed Mar 22, 2024
1 parent 94898b8 commit c4218e1
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:
Expand All @@ -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)"

Expand Down

0 comments on commit c4218e1

Please sign in to comment.