Skip to content

Commit

Permalink
Merge pull request #51 from rootulp/rp/goreleaser-gh
Browse files Browse the repository at this point in the history
fix: run on release
  • Loading branch information
rootulp authored Dec 7, 2024
2 parents a755349 + cdc8cc4 commit 6442701
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 6442701

Please sign in to comment.