diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 00e0d6ba..7890695a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -42,15 +42,28 @@ jobs: git config user.name ${{ github.actor }} git config user.email "<>" + # Read version changelog before anything else - if there is a formatting error + # in the changelog (which happens), we fail fast + # Do this even if we will not make the snapshot release, so the changelog is checked as part of a normal + # ci run. + - id: get-changelog + name: Get version changelog + uses: superfaceai/release-changelog-action@v1 + with: + path-to-changelog: CHANGELOG.md + version: ${{ inputs.release_version }} + operation: read + - name: Build with Maven run: mvn -Pzip install - # delete the snapshot release (the release action does not update the body, so we have to delete the whole thing) + # delete the snapshot release (the release action does not update the + # body, so we have to delete the whole thing) - name: Delete Snapshot Release if: ${{ env.MAKE_SNAPSHOT_RELEASE == 'true' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release delete snapshot --cleanup-tag --yes + run: gh release delete snapshot --cleanup-tag --yes || echo "Error deleting snapshot release - continuing anyway" - name: change tag 'snapshot' to current commit if: ${{ env.MAKE_SNAPSHOT_RELEASE == 'true' }} @@ -58,22 +71,14 @@ jobs: git tag -f snapshot git push -f origin --tags - # Read version changelog - - id: get-changelog - name: Get version changelog - if: ${{ env.MAKE_SNAPSHOT_RELEASE == 'true' }} - uses: superfaceai/release-changelog-action@v1 - with: - path-to-changelog: CHANGELOG.md - version: ${{ inputs.release_version }} - operation: read - - name: Make Release Body if: ${{ env.MAKE_SNAPSHOT_RELEASE == 'true' }} run: | cat src/build/snapshot-release/release-body-header.md > target/release-body.md - echo "# Changes" >> target/release-body.md - echo "${{ steps.get-changelog.outputs.changelog }}" >> target/release-body.md + echo "# Changes" >> target/release-body.md + cat <<'EOF' >> target/release-body.md + ${{ steps.get-changelog.outputs.changelog }} + EOF cat src/build/snapshot-release/release-body-footer.md >> target/release-body.md # Make github release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6471eee4..57bb1fbf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -134,7 +134,9 @@ jobs: run: | cat src/build/release/release-body-header.md > target/release-body.md echo "# Changes" >> target/release-body.md - echo "${{ steps.get-changelog.outputs.changelog }}" >> target/release-body.md + cat <<'EOF' >> target/release-body.md + ${{ steps.get-changelog.outputs.changelog }} + EOF cat src/build/release/release-body-footer.md >> target/release-body.md - name: Release uses: softprops/action-gh-release@v2 @@ -172,7 +174,7 @@ jobs: - name: Delete Snapshot Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release delete snapshot --cleanup-tag --yes + run: gh release delete snapshot --cleanup-tag --yes || echo "Error deleting snapshot release - continuing anyway" # print the summary - name: Print summary diff --git a/CHANGELOG.md b/CHANGELOG.md index ee471899..6f85228c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,7 @@ and this project is in the process of adopting [Semantic Versioning](https://sem - Make `qk:RotationalFrequency` exactMatch of `qk:RotationalVelocity`, remove broader qk - Make `qk:AngularFrequency` exactMatch of `qk:AngularVelocity`, remove broader qk -## Fixed +### Fixed - Rename incorrectly named Unit `unit:Ci` to `unit:CI` - Rename incorrectly named Unit `unit:Flight` to `unit:FLIGHT`