From 939ba0803c7bc40f75c20b404a73607504a67da2 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 9 Jul 2025 13:00:12 +0200 Subject: [PATCH] .github: add workflow for github releases when tag xlibre-xserver-* is pushed, automatically create a github release. Signed-off-by: Enrico Weigelt, metux IT consult --- .github/scripts/github/make-release | 17 +++++++++++++++++ .github/workflows/release.yml | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100755 .github/scripts/github/make-release create mode 100644 .github/workflows/release.yml diff --git a/.github/scripts/github/make-release b/.github/scripts/github/make-release new file mode 100755 index 0000000000..89152bacbd --- /dev/null +++ b/.github/scripts/github/make-release @@ -0,0 +1,17 @@ +#!/bin/bash + +err() { + echo "$0: $*" +} + +[ "$GITHUB_REPOSITORY" ] || err "missing variable GITHUB_REPOSITORY" + +TITLE=$(git tag -l --format='%(contents)' $tag) + +echo "tag=$tag" +echo "title=$TITLE" + +gh release create "$tag" \ + --repo="$GITHUB_REPOSITORY" \ + --title="$tag" \ + --generate-notes diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..b1ce7c3390 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: Publish release on github + +on: + push + +permissions: + contents: write + +jobs: + release: + name: Release pushed tag + runs-on: ubuntu-latest + if: ${{ startsWith(github.ref, 'refs/tags/xlibre-xserver-') }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref_name }} + run: .github/scripts/github/make-release