From cc10cde5096cd6e619b9ec8468638abe9fd840e1 Mon Sep 17 00:00:00 2001 From: Kit PANG Date: Sat, 18 Mar 2023 18:33:15 +0800 Subject: [PATCH] fix(ci): replace @semantic-release/git with GitHub Actions (#27) --- .github/workflows/release.yml | 12 ++++++++++++ .releaserc.json | 7 ------- package.json | 1 - pnpm-lock.yaml | 24 ------------------------ 4 files changed, 12 insertions(+), 32 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60d8bae..6bd62d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,3 +41,15 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: rm -rf dist && pnpm run pre-release && pnpm run semantic-release + - name: Bump package version + uses: peter-evans/create-pull-request@v4 + with: + add-paths: | + docs/CHANGELOG.md + package.json + commit-message: "chore(release): bump version and update CHANGELOG.md [skip ci]" + committer: release-bot + branch: release + delete-branch: true + title: "chore(release): bump version and update CHANGELOG.md" + body: "This PR bumps the version in `package.json` and updates `docs/CHANGELOG.md`." diff --git a/.releaserc.json b/.releaserc.json index f960f84..cb5aa39 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -31,13 +31,6 @@ } ], "@semantic-release/npm", - [ - "@semantic-release/git", - { - "assets": ["docs", "package.json"], - "message": "chore(release): ${nextRelease.version} [skip ci]" - } - ], [ "@semantic-release/github", { diff --git a/package.json b/package.json index e26d8b7..554d132 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,6 @@ "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-typescript": "^11.0.0", "@semantic-release/changelog": "^6.0.2", - "@semantic-release/git": "^10.0.1", "@semantic-release/npm": "^9.0.2", "@swc/core": "^1.3.41", "@swc/jest": "^0.2.24", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c4a5839..a9a6a0f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,7 +8,6 @@ specifiers: "@rollup/plugin-node-resolve": ^15.0.1 "@rollup/plugin-typescript": ^11.0.0 "@semantic-release/changelog": ^6.0.2 - "@semantic-release/git": ^10.0.1 "@semantic-release/npm": ^9.0.2 "@swc/core": ^1.3.41 "@swc/jest": ^0.2.24 @@ -48,7 +47,6 @@ devDependencies: "@rollup/plugin-node-resolve": 15.0.1_rollup@3.19.1 "@rollup/plugin-typescript": 11.0.0_fdjuvc2nv6pux6mopwweaawpgm "@semantic-release/changelog": 6.0.2_semantic-release@19.0.5 - "@semantic-release/git": 10.0.1_semantic-release@19.0.5 "@semantic-release/npm": 9.0.2_semantic-release@19.0.5 "@swc/core": 1.3.41 "@swc/jest": 0.2.24_@swc+core@1.3.41 @@ -1551,28 +1549,6 @@ packages: engines: { node: ">=14.17" } dev: true - /@semantic-release/git/10.0.1_semantic-release@19.0.5: - resolution: - { - integrity: sha512-eWrx5KguUcU2wUPaO6sfvZI0wPafUKAMNC18aXY4EnNcrZL86dEmpNVnC9uMpGZkmZJ9EfCVJBQx4pV4EMGT1w==, - } - engines: { node: ">=14.17" } - peerDependencies: - semantic-release: ">=18.0.0" - dependencies: - "@semantic-release/error": 3.0.0 - aggregate-error: 3.1.0 - debug: 4.3.4 - dir-glob: 3.0.1 - execa: 5.1.1 - lodash: 4.17.21 - micromatch: 4.0.5 - p-reduce: 2.1.0 - semantic-release: 19.0.5 - transitivePeerDependencies: - - supports-color - dev: true - /@semantic-release/github/8.0.7_semantic-release@19.0.5: resolution: {