Skip to content

Commit

Permalink
Merge pull request #4221 from serlo/ci/publish-only-one-tag-per-relea…
Browse files Browse the repository at this point in the history
…se-and-write-body

ci: Publish only one tag per editor release and write body with release notes
  • Loading branch information
CodingDive authored Oct 24, 2024
2 parents c518935 + 0b45255 commit 6036f88
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/editor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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<<EOF" >> $GITHUB_ENV
# Only for debugging since in the last run, the body was not published
echo "Extracted changelog:"
echo "$CHANGELOG"
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$CHANGELOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
Expand All @@ -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 "$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 "$CHANGELOG" | jq -Rs .)
}
EOF
2 changes: 1 addition & 1 deletion packages/editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6036f88

Please sign in to comment.