Skip to content

Commit 1202384

Browse files
committed
Use changelog in ci release via yarn, add fetch tags and patch GITHUB_OUTPUT usage
1 parent 7ea2353 commit 1202384

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
- run: yarn
1717
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
1818

19+
- name: Fetch tags from git history
20+
run: git fetch --unshallow --tags
21+
1922
- name: Extract version from package.json
2023
id: package_version
2124
run: echo "VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV
@@ -26,16 +29,22 @@ jobs:
2629
VERSION=${{ env.VERSION }}
2730
echo "Searching for version: $VERSION in CHANGELOG.md"
2831
29-
CHANGELOG_OUTPUT=$(npx auto-changelog --stdout)
32+
CHANGELOG_OUTPUT=$(yarn changelog --stdout)
3033
NOTES=$(echo "$CHANGELOG_OUTPUT" | awk "/\/${VERSION//./\\.} \(/ {print; flag=1; next} /^solidity-utils\// {flag=0} flag")
3134
35+
echo "$NOTES"
36+
3237
if [ -z "$NOTES" ]; then
3338
echo "❌ No changelog entry found for version $VERSION"
3439
echo "Use: yarn changelog"
3540
exit 1
3641
fi
3742
38-
echo "::set-output name=notes::$NOTES"
43+
{
44+
echo "notes<<EOF"
45+
printf "%s\n" "$NOTES"
46+
echo "EOF"
47+
} >> "$GITHUB_OUTPUT"
3948
shell: bash
4049

4150

0 commit comments

Comments
 (0)