From 55fb461b7a8e635479f2774446191bddf5ed546d Mon Sep 17 00:00:00 2001 From: Mikey Stengel Date: Thu, 24 Oct 2024 13:58:48 +0200 Subject: [PATCH 1/2] fix(ci): Push only one tag, add debugging for the latest changelog and try to write body --- .github/workflows/editor.yaml | 15 ++++++++++++--- packages/editor/CHANGELOG.md | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/editor.yaml b/.github/workflows/editor.yaml index e01e7eb12a..b2e161d740 100644 --- a/.github/workflows/editor.yaml +++ b/.github/workflows/editor.yaml @@ -53,8 +53,12 @@ jobs: - name: Extract changelog for current version id: extract_changelog run: | + echo "Extracting changelog for version $CURRENT_VERSION" CHANGELOG=$(awk "/## Changelog for version $CURRENT_VERSION/,/^##/" packages/editor/CHANGELOG.md | sed '$d') - echo "RELEASE_NOTES<> $GITHUB_ENV + # Only for debugging since in the last run, the body was not published + echo "Extracted changelog:" + echo "$CHANGELOG" + echo "CHANGELOG<> $GITHUB_ENV echo "$CHANGELOG" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV @@ -64,14 +68,19 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} RELEASE_VERSION: ${{ steps.get_version.outputs.version }} run: | + TAG_NAME="v${RELEASE_VERSION}-editor" + # Debugging again + echo "Release body:" + echo "${{ env.CHANGELOG }}" + curl -X POST \ -H "Authorization: token $GH_TOKEN" \ -H "Accept: application/vnd.github.v3+json" \ https://api.github.com/repos/${{ github.repository }}/releases \ -d @- << EOF { - "tag_name": "v${RELEASE_VERSION}", + "tag_name": "${TAG_NAME}", "name": "Serlo Editor - v${RELEASE_VERSION}", - "body": $(echo "$RELEASE_NOTES" | jq -Rs .) + "body": $(echo "${{ env.CHANGELOG }}" | jq -Rs .) } EOF diff --git a/packages/editor/CHANGELOG.md b/packages/editor/CHANGELOG.md index cd4294f73a..079ee99fbf 100644 --- a/packages/editor/CHANGELOG.md +++ b/packages/editor/CHANGELOG.md @@ -27,7 +27,7 @@ **Full Changelog**: https://github.com/serlo/frontend/compare/v0.16.0-editor...v0.17.0-editor -## Changelog for version 0.16 +## Changelog for version 0.16.0 feat(editor): Enable gallery plugin, free text exercise plugin and interactive image (dropzone) plugin fix(rows): check if interactive exercise plugins are supported in menu items filter From 0b452551beddad8f5457fd03aaac0824c8cdf9be Mon Sep 17 00:00:00 2001 From: Mikey Stengel Date: Thu, 24 Oct 2024 14:00:32 +0200 Subject: [PATCH 2/2] refactor(ci): Use shell way of accessing variables --- .github/workflows/editor.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/editor.yaml b/.github/workflows/editor.yaml index b2e161d740..bb8eca253a 100644 --- a/.github/workflows/editor.yaml +++ b/.github/workflows/editor.yaml @@ -71,7 +71,7 @@ jobs: TAG_NAME="v${RELEASE_VERSION}-editor" # Debugging again echo "Release body:" - echo "${{ env.CHANGELOG }}" + echo "$CHANGELOG" curl -X POST \ -H "Authorization: token $GH_TOKEN" \ @@ -81,6 +81,6 @@ jobs: { "tag_name": "${TAG_NAME}", "name": "Serlo Editor - v${RELEASE_VERSION}", - "body": $(echo "${{ env.CHANGELOG }}" | jq -Rs .) + "body": $(echo "$CHANGELOG" | jq -Rs .) } EOF