From 50e4353f46c5963bb8e2b924e2c9bfaaa3c911d8 Mon Sep 17 00:00:00 2001 From: msclock Date: Fri, 11 Oct 2024 11:26:11 +0800 Subject: [PATCH] fix(ci): resolve semantic release errors (#384) Signed-off-by: msclock --- .github/workflows/semantic-release.yml | 19 +++++++++---------- .../workflows/semantic-release.yml.jinja | 19 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index 46a2f794..a5dd9d9f 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -45,17 +45,16 @@ jobs: fetch-depth: 0 token: ${{ steps.bot_token.outputs.token || secrets.PAT || secrets.GITHUB_TOKEN }} - - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + - name: Setup Node.js + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 with: - node-version: 20 + node-version: lts/* - - uses: cycjimmy/semantic-release-action@v4 - id: semantic - with: - semantic_version: 22 - extra_plugins: | - @semantic-release/exec - @semantic-release/github - conventional-changelog-conventionalcommits@7 + - name: Semantic Release env: GITHUB_TOKEN: ${{ steps.bot_token.outputs.token || secrets.PAT || secrets.GITHUB_TOKEN }} + run: > + npx + --package conventional-changelog-conventionalcommits@7 + --package semantic-release@22 + semantic-release diff --git a/template/[% if repo_platform == 'github' %].github[% endif %]/workflows/semantic-release.yml.jinja b/template/[% if repo_platform == 'github' %].github[% endif %]/workflows/semantic-release.yml.jinja index d6d0e558..bc980879 100644 --- a/template/[% if repo_platform == 'github' %].github[% endif %]/workflows/semantic-release.yml.jinja +++ b/template/[% if repo_platform == 'github' %].github[% endif %]/workflows/semantic-release.yml.jinja @@ -45,17 +45,16 @@ jobs: fetch-depth: 0 token: {{ '${{ steps.bot_token.outputs.token || secrets.PAT || secrets.GITHUB_TOKEN }}' }} - - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + - name: Setup Node.js + uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 with: - node-version: 20 + node-version: lts/* - - uses: cycjimmy/semantic-release-action@v4 - id: semantic - with: - semantic_version: 22 - extra_plugins: | - @semantic-release/exec - @semantic-release/github - conventional-changelog-conventionalcommits@7 + - name: Semantic Release env: GITHUB_TOKEN: {{ '${{ steps.bot_token.outputs.token || secrets.PAT || secrets.GITHUB_TOKEN }}' }} + run: > + npx + --package conventional-changelog-conventionalcommits@7 + --package semantic-release@22 + semantic-release