diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1106d688..22e4d190 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,22 @@ jobs: with: node-version: 16.x - - run: npx changelogithub + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + + - name: Restore yarn cache + uses: actions/cache@v3 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install dependencies + run: yarn + + - run: yarn version:release env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.yarn/patches/changelogithub-npm-0.12.7-72f348805d.patch b/.yarn/patches/changelogithub-npm-0.12.7-72f348805d.patch new file mode 100644 index 00000000..b4171d63 --- /dev/null +++ b/.yarn/patches/changelogithub-npm-0.12.7-72f348805d.patch @@ -0,0 +1,23 @@ +diff --git a/dist/shared/changelogithub.821fab93.mjs b/dist/shared/changelogithub.821fab93.mjs +index 5fc2100867613c20f7827eac8715a5fc28bdc39e..97bd8dff878b81c63d2220e496904f6f3933589a 100644 +--- a/dist/shared/changelogithub.821fab93.mjs ++++ b/dist/shared/changelogithub.821fab93.mjs +@@ -181,7 +181,7 @@ function formatLine(commit, options) { + function formatTitle(name, options) { + if (!options.emoji) + name = name.replace(emojisRE, ""); +- return `###    ${name.trim()}`; ++ return `##    ${name.trim()}`; + } + function formatSection(commits, sectionName, options) { + if (!commits.length) +@@ -198,7 +198,8 @@ function formatSection(commits, sectionName, options) { + Object.keys(scopes).sort().forEach((scope) => { + let padding = ""; + let prefix = ""; +- const scopeText = `**${options.scopeMap[scope] || scope}**`; ++ const url = `https://github.com/${options.github}/tree/main/packages/${scope}` ++ const scopeText = `[**@${options.github.split("/")[0]}/${options.scopeMap[scope] || scope}**](${url})` + if (scope && useScopeGroup) { + lines.push(`- ${scopeText}:`); + padding = " "; diff --git a/package.json b/package.json index 1bf26837..ce2ae5f7 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "docs": "yarn workspaces foreach run docs", "commit": "cz", "precommit": "lint-staged", - "postinstall": "yarn download:snark-artifacts" + "postinstall": "yarn download:snark-artifacts", + "version:release": "changelogithub" }, "keywords": [ "ethereum", @@ -53,6 +54,7 @@ "@typescript-eslint/eslint-plugin": "^5.9.1", "@typescript-eslint/parser": "^5.9.1", "babel-jest": "^27.4.6", + "changelogithub": "0.12.7", "commitizen": "^4.2.4", "cz-conventional-changelog": "^3.3.0", "dotenv": "^16.0.2", @@ -76,5 +78,8 @@ "commitizen": { "path": "./node_modules/cz-conventional-changelog" } + }, + "resolutions": { + "changelogithub@0.12.7": "patch:changelogithub@npm:0.12.7#.yarn/patches/changelogithub-npm-0.12.7-72f348805d.patch" } } diff --git a/yarn.lock.REMOVED.git-id b/yarn.lock.REMOVED.git-id index f2d4a0e8..e8ffb8a8 100644 --- a/yarn.lock.REMOVED.git-id +++ b/yarn.lock.REMOVED.git-id @@ -1 +1 @@ -e3f1cef9a70f826196bb6917d4703d482c7d2dde \ No newline at end of file +9bf1a6acd86c0a29658234faa9c527b957fff89c \ No newline at end of file