diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1a8c9b..fbb32e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,6 +9,15 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'yarn' + - 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 @@ -20,16 +29,21 @@ 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" + echo "❌ No changelog entry found for version $VERSION. Check the version tag is exist." exit 1 fi - echo "::set-output name=notes::$NOTES" + { + echo "notes<> "$GITHUB_OUTPUT" shell: bash diff --git a/package.json b/package.json index 4234908..24353a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@1inch/solidity-utils", - "version": "6.4.0", + "version": "6.4.1", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "exports": {