Skip to content

Commit

Permalink
ci(release): seperate is-tag as a job
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 c4218e1 commit 3df22b4
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,25 @@ env:
PGO_FILE: "default.pgo"

jobs:
is-tag:
runs-on: ubuntu-latest
steps:
- name: Is ref tag?
if: >
(
github.ref_type != 'tag' &&
github.event_name == 'workflow_dispatch'
)
run: exit 1

release:
name: goreleaser-cross
runs-on: ubuntu-latest
needs: is-tag
container:
image: ghcr.io/goreleaser/goreleaser-cross:latest
steps:
- uses: actions/checkout@master

- name: Is ref tag?
if: (github.event_name == 'workflow_dispatch' && github.ref_type != 'tag')
run: exit 1

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
Expand Down

0 comments on commit 3df22b4

Please sign in to comment.