From ee131abeee45fe0e474ddee95fc0cd3ce6837a5b Mon Sep 17 00:00:00 2001 From: Dionisio Date: Wed, 11 Feb 2026 14:11:16 +0100 Subject: [PATCH] ci: add release workflow for automated GitHub releases --- .github/workflows/release.yml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..24f1cee7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + release: + name: Create GitHub Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Generate release notes + id: notes + run: | + # Get previous tag (if any) + PREV_TAG=$(git tag --sort=-creatordate | head -2 | tail -1 || echo "") + if [ -n "$PREV_TAG" ] && [ "$PREV_TAG" != "${{ github.ref_name }}" ]; then + RANGE="${PREV_TAG}..${{ github.ref_name }}" + else + RANGE="${{ github.ref_name }}" + fi + echo "range=${RANGE}" >> "$GITHUB_OUTPUT" + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true + make_latest: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}