chore(deps): bump zad-cli naar v0.8.0 en lees nieuwe diagnose-output … #24
Workflow file for this run
This file contains hidden or 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
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Extract version info | |
| id: version | |
| run: | | |
| TAG=${GITHUB_REF#refs/tags/} | |
| VERSION=${TAG#v} | |
| MAJOR=$(echo "$TAG" | cut -d. -f1) | |
| { | |
| echo "tag=$TAG" | |
| echo "version=$VERSION" | |
| echo "major=$MAJOR" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Verify CHANGELOG entry exists | |
| run: | | |
| VERSION=${{ steps.version.outputs.version }} | |
| if ! grep -q "## \[$VERSION\]" CHANGELOG.md; then | |
| echo "::error::No CHANGELOG entry found for version $VERSION" | |
| echo "::error::Please add a '## [$VERSION]' section to CHANGELOG.md before releasing" | |
| exit 1 | |
| fi | |
| echo "Found CHANGELOG entry for version $VERSION" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ steps.version.outputs.tag }} | |
| name: ${{ steps.version.outputs.tag }} | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: false | |
| - name: Update major version tag | |
| run: | | |
| MAJOR=${{ steps.version.outputs.major }} | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| # Delete the major tag if it exists (both local and remote) | |
| git tag -d "$MAJOR" 2>/dev/null || true | |
| git push origin ":refs/tags/$MAJOR" 2>/dev/null || true | |
| # Create and push the new major tag pointing to this commit | |
| git tag "$MAJOR" | |
| git push origin "$MAJOR" | |
| echo "Updated $MAJOR tag to point to ${{ steps.version.outputs.tag }}" | |
| - name: Rollback tag on failure | |
| if: failure() | |
| run: | | |
| TAG=${{ steps.version.outputs.tag }} | |
| echo "::warning::Rolling back tag $TAG due to workflow failure" | |
| git push origin ":refs/tags/$TAG" 2>/dev/null || true | |
| echo "Tag $TAG has been removed. Fix the issue and push the tag again." |