Skip to content

Commit

Permalink
chore(ci): only release after CI on main passes
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Aug 25, 2024
1 parent d58f51f commit d6374c2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 25 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,24 @@ jobs:
golangci-lint run
); done
git diff
release:
if: github.ref == 'refs/heads/main'
needs: ["test", "lint"]
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: cashapp/activate-hermit@v1
- uses: charlesthomas/github-action-svu@v1.0.5+2.1.1
id: svu
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
git tag ${{ steps.svu.outputs.next }}
goreleaser release --fail-fast
git push --tags
if: ${{ steps.svu.outputs.changed }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 0 additions & 25 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit d6374c2

Please sign in to comment.