chore(ci): only release after CI on main passes #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Triggered once CI on main passes | ||
on: | ||
workflow_call: | ||
secrets: | ||
GITHUB_TOKEN: | ||
description: "GitHub Token" | ||
required: true | ||
name: Release | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: cashapp/activate-hermit@v1 | ||
- uses: charlesthomas/[email protected]+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 }} |