From dc86065a5ef7e6d47855d3389b7fc03266744acb Mon Sep 17 00:00:00 2001 From: cedoor Date: Thu, 23 Feb 2023 15:44:28 +0100 Subject: [PATCH] ci(github): update release workflow with npm patched command --- .github/workflows/release.yml | 18 ++++++++++++++- ...changelogithub-npm-0.12.7-72f348805d.patch | 23 +++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .yarn/patches/changelogithub-npm-0.12.7-72f348805d.patch diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1106d68..22e4d19 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 0000000..b4171d6 --- /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 = " ";