Skip to content

Commit

Permalink
fix: run on release
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed Dec 7, 2024
1 parent 8ffc647 commit cdc8cc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- "v*"
tags:
- "v*"
release:
types: [published]
pull_request:

jobs:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:

jobs:
goreleaser-check:
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: Set GORELEASER_CURRENT_TAG in GitHub env
if: github.event_name == 'release'
run: echo "GORELEASER_CURRENT_TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
Expand All @@ -28,18 +28,16 @@ jobs:
GORELEASER_CURRENT_TAG: ${{ env.GORELEASER_CURRENT_TAG }}

goreleaser:
if: github.event_name == 'release'
needs: goreleaser-check
runs-on: ubuntu-latest
if: |
(github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
permissions: write-all
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git fetch --force --tags
- name: Set GORELEASER_CURRENT_TAG in GitHub env
if: github.event_name == 'release'
run: echo "GORELEASER_CURRENT_TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
Expand Down

0 comments on commit cdc8cc4

Please sign in to comment.