Closed KonradHoeffner closed 1 month ago
The problem seems to be that we have old semver tags (0.1.0 to 3.0) mixed with calver tags (22.05 to 24.06 up to now) and this seems to confuse the default semver sorting mechanism even though they should be compatible (24.06 should be bigger than both 3.0 and 1.1.0 with semver sorting).
We need to adapt the configuration settings in .github/workflows/release.yml
, see https://github.com/mikepenz/release-changelog-builder-action?tab=readme-ov-file#configuration-specification.
Test release 24.99 notes are still not correct, see https://github.com/snikproject/graph/releases/tag/untagged-47e2771cc54488bac9df.
@Yagnap: Can you take a look if you can fix it? The workflow is https://github.com/snikproject/graph/blob/master/.github/workflows/release.yml:
name: Release
on:
push:
tags: '[2-9][0-9]\.[0-9][0-9]'
jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Build Changelog
id: build-changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
commitMode: true
configurationJson: |
{
"pr_template": "- #{{TITLE}}",
"template": "#{{UNCATEGORIZED}}",
"tag_resolver": {
"method": "semver",
"filter": {
"pattern": "[2-9][0-9]\.[0-9][0-9]"
}
}
}
- name: Create Release
id: create-release
uses: softprops/action-gh-release@v2
with:
body: ${{steps.build-changelog.outputs.changelog}}
For comparison, here is the complete https://github.com/hitontology/ontology/blob/master/.github/workflows/release.yml from the HITO ontology repo, where it works:
name: Release
on:
push:
tags: '[2-9][0-9]\.[0-9][0-9]'
jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
steps:
- name: Changelog
id: changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
commitMode: true
configurationJson: |
{
"pr_template": "- #{{TITLE}}",
"template": "#{{UNCATEGORIZED}}"
}
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install -y raptor2-utils
- name: Build
id: build
run: |
scripts/combine | tee $GITHUB_STEP_SUMMARY
echo 'summary<<EOF' >> $GITHUB_OUTPUT
cat ${GITHUB_STEP_SUMMARY} >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Create Release
id: create-release
uses: softprops/action-gh-release@v2
with:
body: |
${{ steps.build.outputs.summary }}
${{ steps.changelog.outputs.changelog }}
files: |
dist/hito.nt
dist/hito.ttl
dist/shacl.ttl
This works when checking out the repository of release-changelog-build but not in our action as the previous tag erroneously gets detected as a named one (not numbered one):
- name: Build Changelog
id: build-changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
commitMode: true
configurationJson: |
{
"pr_template": "- #{{TITLE}}",
"template": "#{{UNCATEGORIZED}}",
"tag_resolver": {
"method": "sort",
"filter": {
"pattern": "^(?![2-9][0-9]\\.[0-9][0-9]).*"
}
}
}
Fixed in 8a4bcb83447b5f0b4a268554beb9cd1ac68bad4e.
Right now, the release notes include a lot of commit messages from way before the last one.