From df3d98735eebf0ed0bc2e05288ff750a7c580621 Mon Sep 17 00:00:00 2001 From: Nikos Anestos Date: Fri, 20 Feb 2026 10:40:20 +0100 Subject: [PATCH 1/4] IS-11036 added workflow to create a release when the repo is tagged --- .github/workflows/release.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 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..926c248a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release UI Kit + +on: + push: + tags: + - 'ui-kit-*' + +permissions: + contents: write + +jobs: + create-release: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Extract version from tag + id: extract_version + run: | + TAG_NAME=${GITHUB_REF#refs/tags/} + VERSION=${TAG_NAME#ui-kit-} + echo "version=$VERSION" >> $GITHUB_OUTPUT + + - name: Create GitHub Release + uses: actions/create-release@v1 + with: + tag_name: ${{ github.ref_name }} + release_name: ${{ steps.extract_version.outputs.version }} + draft: false + prerelease: false From 738e6698073cf49f15d297e48db1b0ad6a216177 Mon Sep 17 00:00:00 2001 From: Nikos Anestos Date: Fri, 20 Feb 2026 10:44:42 +0100 Subject: [PATCH 2/4] IS-11036 added changelog --- .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 926c248a..203c4caf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,6 +15,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v6 + - name: Fetch all tags + run: git fetch --tags --force + - name: Extract version from tag id: extract_version run: | @@ -22,10 +25,44 @@ jobs: VERSION=${TAG_NAME#ui-kit-} echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Find previous tag + id: prev_tag + run: | + TAGS=$(git tag --list 'ui-kit-*' --sort=-creatordate) + CURRENT_TAG=${GITHUB_REF#refs/tags/} + PREV_TAG=$(echo "$TAGS" | grep -v "^$CURRENT_TAG$" | head -n 1) + echo "prev_tag=$PREV_TAG" >> $GITHUB_OUTPUT + + - name: Generate changelog from merged PRs + id: changelog + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + CURRENT_TAG=${GITHUB_REF#refs/tags/} + PREV_TAG="${{ steps.prev_tag.outputs.prev_tag }}" + if [ -z "$PREV_TAG" ]; then + # First release: get all merged PRs + RANGE="" + else + RANGE="$PREV_TAG..$CURRENT_TAG" + fi + PRS=$(git log $RANGE --merges --pretty=format:'%s %b' | grep -oE '#[0-9]+' | sort -u | tr -d '#') + if [ -z "$PRS" ]; then + echo 'changelog=No merged pull requests found.' >> $GITHUB_OUTPUT + else + BODY="" + for PR in $PRS; do + TITLE=$(gh pr view $PR --json title --jq '.title') + BODY+="- PR #$PR: $TITLE\n" + done + echo -e "changelog=$BODY" >> $GITHUB_OUTPUT + fi + - name: Create GitHub Release uses: actions/create-release@v1 with: tag_name: ${{ github.ref_name }} release_name: ${{ steps.extract_version.outputs.version }} + body: ${{ steps.changelog.outputs.changelog }} draft: false prerelease: false From aebbb672c7296b3cb04474de38758f4a52cd68d4 Mon Sep 17 00:00:00 2001 From: Nikos Anestos Date: Fri, 20 Feb 2026 10:51:53 +0100 Subject: [PATCH 3/4] IS-11036 update action --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 203c4caf..ec15d711 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,10 +59,11 @@ jobs: fi - name: Create GitHub Release - uses: actions/create-release@v1 + uses: softprops/action-gh-release@v2 with: tag_name: ${{ github.ref_name }} - release_name: ${{ steps.extract_version.outputs.version }} + name: ${{ steps.extract_version.outputs.version }} body: ${{ steps.changelog.outputs.changelog }} draft: false prerelease: false + token: ${{ secrets.GITHUB_TOKEN }} From 0ecc86d6cbd4c7ab0e8514da5a4e805e66348221 Mon Sep 17 00:00:00 2001 From: Nikos Anestos Date: Mon, 23 Feb 2026 16:09:49 +0100 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/release.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec15d711..ef467717 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: permissions: contents: write + pull-requests: read jobs: create-release: @@ -14,10 +15,9 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v6 - - - name: Fetch all tags - run: git fetch --tags --force - + with: + fetch-depth: 0 + fetch-tags: true - name: Extract version from tag id: extract_version run: | @@ -53,9 +53,13 @@ jobs: BODY="" for PR in $PRS; do TITLE=$(gh pr view $PR --json title --jq '.title') - BODY+="- PR #$PR: $TITLE\n" + BODY+="- PR #$PR: $TITLE"$'\n' done - echo -e "changelog=$BODY" >> $GITHUB_OUTPUT + { + echo 'changelog<> "$GITHUB_OUTPUT" fi - name: Create GitHub Release