Skip to content

Commit

Permalink
Use changelog in ci release via yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
zZoMROT committed Feb 3, 2025
1 parent 7ea2353 commit c62b052
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
- run: yarn
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Fetch tags from git history
run: git fetch --unshallow --tags

- name: Extract version from package.json
id: package_version
run: echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
Expand All @@ -26,16 +29,22 @@ jobs:
VERSION=${{ env.VERSION }}
echo "Searching for version: $VERSION in CHANGELOG.md"
CHANGELOG_OUTPUT=$(npx auto-changelog --stdout)
CHANGELOG_OUTPUT=$(yarn changelog --stdout)
NOTES=$(echo "$CHANGELOG_OUTPUT" | awk "/\/${VERSION//./\\.} \(/ {print; flag=1; next} /^solidity-utils\// {flag=0} flag")
echo "$NOTES"
if [ -z "$NOTES" ]; then
echo "❌ No changelog entry found for version $VERSION"
echo "Use: yarn changelog"
exit 1
fi
echo "::set-output name=notes::$NOTES"
{
echo "notes<<EOF"
printf "%s\n" "$NOTES"
echo "EOF"
} >> "$GITHUB_OUTPUT"
shell: bash


Expand Down

0 comments on commit c62b052

Please sign in to comment.