Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
ci: fix ci and build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Jun 17, 2022
1 parent 5181985 commit ead6573
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,15 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
args: release --rm-dist --snapshot
args: release --rm-dist $SNAPSHOT
env:
SNAPSHOT: ${{ !needs.info.outputs.tag && '--snapshot' || '' }}
GORELEASER_CURRENT_TAG: ${{ needs.info.outputs.tag || '0.0.0' }}
- name: Rename artifacts
if: "!needs.info.outputs.tag"
run: for f in $ARTIFACTS; do mv $f $(echo $f | sed -E 's/_0\.0\.0-SNAPSHOT-[^_]*/_${NAME}/'); done
env:
NAME: ${{ needs.info.outputs.tag || needs.info.outputs.name }}
NAME: ${{ needs.info.outputs.name }}
- name: Release nightly/rc
if: "!needs.info.outputs.tag"
uses: ncipollo/release-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
ci:
name: CI
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, 'v')"
if: github.event_name !== 'push' || !startsWith(github.event.head_commit.message, 'v')
services:
mongo:
image: mongo:4.4-focal
Expand Down

0 comments on commit ead6573

Please sign in to comment.