mirror of
https://github.com/yanhao98/semantic-release-action.git
synced 2025-07-13 15:50:48 +08:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
6dc2e59e43 | |||
633c423764 | |||
a5aee42853 | |||
1ae25ac339 | |||
b08b8428f7 | |||
64aca0ecbf |
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- uses: yanhao98/semantic-release-example@main
|
- uses: yanhao98/semantic-release-action@main
|
||||||
id: release
|
id: release
|
||||||
- name: Print the new release version
|
- name: Print the new release version
|
||||||
run: |
|
run: |
|
||||||
|
14
CHANGELOG.md
14
CHANGELOG.md
@ -1,3 +1,17 @@
|
|||||||
|
# [1.2.0](https://github.com/yanhao98/semantic-release-action/compare/v1.1.1...v1.2.0) (2024-10-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* log semantic release result in a grouped output ([1ae25ac](https://github.com/yanhao98/semantic-release-action/commit/1ae25ac339f009d3fc5d4da0aa5ece8d15552826))
|
||||||
|
|
||||||
|
## [1.1.1](https://github.com/yanhao98/semantic-release-action/compare/v1.1.0...v1.1.1) (2024-10-06)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* update action reference and enhance documentation ([64aca0e](https://github.com/yanhao98/semantic-release-action/commit/64aca0ecbfe377aeb2ad1adf2efc95abbc8d2292))
|
||||||
|
|
||||||
# [1.1.0](https://github.com/yanhao98/semantic-release-example/compare/v1.0.0...v1.1.0) (2024-10-06)
|
# [1.1.0](https://github.com/yanhao98/semantic-release-example/compare/v1.0.0...v1.1.0) (2024-10-06)
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ BREAKING CHANGE:
|
|||||||
|
|
||||||
## 参考
|
## 参考
|
||||||
---
|
---
|
||||||
|
- https://github.dev/cycjimmy/semantic-release-action
|
||||||
- [Can I run semantic-release on my local machine rather than on a CI server?](https://semantic-release.gitbook.io/semantic-release/support/faq#can-i-run-semantic-release-on-my-local-machine-rather-than-on-a-ci-server)
|
- [Can I run semantic-release on my local machine rather than on a CI server?](https://semantic-release.gitbook.io/semantic-release/support/faq#can-i-run-semantic-release-on-my-local-machine-rather-than-on-a-ci-server)
|
||||||
- [Can I use semantic-release to publish non-JavaScript packages?](https://semantic-release.gitbook.io/semantic-release/support/faq#can-i-use-semantic-release-to-publish-non-javascript-packages)
|
- [Can I use semantic-release to publish non-JavaScript packages?](https://semantic-release.gitbook.io/semantic-release/support/faq#can-i-use-semantic-release-to-publish-non-javascript-packages)
|
||||||
- [pre-release-branches](https://semantic-release.gitbook.io/semantic-release/usage/workflow-configuration#pre-release-branches)
|
- [pre-release-branches](https://semantic-release.gitbook.io/semantic-release/usage/workflow-configuration#pre-release-branches)
|
||||||
|
@ -5,8 +5,10 @@ branding:
|
|||||||
icon: 'heart'
|
icon: 'heart'
|
||||||
color: 'red'
|
color: 'red'
|
||||||
outputs:
|
outputs:
|
||||||
|
next_release_published:
|
||||||
|
description: '新版本是否已发布'
|
||||||
next_release_version:
|
next_release_version:
|
||||||
description: 'Version of the new release'
|
description: '新版本号'
|
||||||
runs:
|
runs:
|
||||||
# pre: 'index.mjs'
|
# pre: 'index.mjs'
|
||||||
using: 'node20'
|
using: 'node20'
|
||||||
|
@ -11,6 +11,7 @@ async function installDependencies() {
|
|||||||
// const _extras = extras.replace(/['"]/g, '').replace(/[\n\r]/g, ' ');
|
// const _extras = extras.replace(/['"]/g, '').replace(/[\n\r]/g, ' ');
|
||||||
const deps = [
|
const deps = [
|
||||||
'semantic-release',
|
'semantic-release',
|
||||||
|
'@semantic-release/exec',
|
||||||
'@actions/core',
|
'@actions/core',
|
||||||
].join(' ');
|
].join(' ');
|
||||||
const { stdout, stderr } = await exec(`npm install ${deps} --no-audit --no-save`, {
|
const { stdout, stderr } = await exec(`npm install ${deps} --no-audit --no-save`, {
|
||||||
@ -39,6 +40,9 @@ async function runRelease() {
|
|||||||
} else {
|
} else {
|
||||||
core.setOutput('next_release_published', 'false');
|
core.setOutput('next_release_published', 'false');
|
||||||
}
|
}
|
||||||
|
await core.group('Semantic Release Result', async () => {
|
||||||
|
core.info(`result :>> ${JSON.stringify(result, null, 2)}`);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.CI) await installDependencies();
|
if (process.env.CI) await installDependencies();
|
||||||
|
@ -1,49 +0,0 @@
|
|||||||
2024-10-06T14:35:04.1779664Z ##[group]Run yanhao98/semantic-release-example@main
|
|
||||||
2024-10-06T14:35:04.1780519Z env:
|
|
||||||
2024-10-06T14:35:04.1780894Z TZ: Asia/Shanghai
|
|
||||||
2024-10-06T14:35:04.1781309Z ##[endgroup]
|
|
||||||
2024-10-06T14:35:04.2106109Z (node:1761) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
|
|
||||||
2024-10-06T14:35:04.2109835Z (Use `node --trace-warnings ...` to show where the warning was created)
|
|
||||||
2024-10-06T14:35:17.7126122Z
|
|
||||||
2024-10-06T14:35:17.7128039Z added 324 packages in 13s
|
|
||||||
2024-10-06T14:35:17.7128671Z
|
|
||||||
2024-10-06T14:35:17.7129167Z 100 packages are looking for funding
|
|
||||||
2024-10-06T14:35:17.7130191Z run `npm fund` for details
|
|
||||||
2024-10-06T14:35:17.7131142Z
|
|
||||||
2024-10-06T14:35:18.1847578Z [10:35:18 PM] [semantic-release] › ℹ Running semantic-release version 24.1.2
|
|
||||||
2024-10-06T14:35:18.2815028Z [10:35:18 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/changelog"
|
|
||||||
2024-10-06T14:35:18.2817079Z [10:35:18 PM] [semantic-release] › ✔ Loaded plugin "verifyConditions" from "@semantic-release/git"
|
|
||||||
2024-10-06T14:35:18.2821252Z [10:35:18 PM] [semantic-release] › ✔ Loaded plugin "analyzeCommits" from "@semantic-release/commit-analyzer"
|
|
||||||
2024-10-06T14:35:18.2825243Z [10:35:18 PM] [semantic-release] › ✔ Loaded plugin "generateNotes" from "@semantic-release/release-notes-generator"
|
|
||||||
2024-10-06T14:35:18.2829021Z [10:35:18 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/changelog"
|
|
||||||
2024-10-06T14:35:18.2831145Z [10:35:18 PM] [semantic-release] › ✔ Loaded plugin "prepare" from "@semantic-release/git"
|
|
||||||
2024-10-06T14:35:19.0915008Z [10:35:19 PM] [semantic-release] › ✔ Run automated release from branch main on repository https://github.com/yanhao98/semantic-release-example
|
|
||||||
2024-10-06T14:35:19.2549954Z [10:35:19 PM] [semantic-release] › ✔ Allowed to push to the Git repository
|
|
||||||
2024-10-06T14:35:19.2554522Z [10:35:19 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/changelog"
|
|
||||||
2024-10-06T14:35:19.2565979Z [10:35:19 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/changelog"
|
|
||||||
2024-10-06T14:35:19.2568137Z [10:35:19 PM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/git"
|
|
||||||
2024-10-06T14:35:19.2575223Z [10:35:19 PM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/git"
|
|
||||||
2024-10-06T14:35:19.2577671Z [10:35:19 PM] [semantic-release] › ℹ No git tag version found on branch main
|
|
||||||
2024-10-06T14:35:19.2580146Z [10:35:19 PM] [semantic-release] › ℹ No previous release found, retrieving all commits
|
|
||||||
2024-10-06T14:35:19.2663792Z [10:35:19 PM] [semantic-release] › ℹ Found 2 commits since last release
|
|
||||||
2024-10-06T14:35:19.2667850Z [10:35:19 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
|
|
||||||
2024-10-06T14:35:19.2709264Z [10:35:19 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat: first commit
|
|
||||||
2024-10-06T14:35:19.2716462Z [10:35:19 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The release type for the commit is minor
|
|
||||||
2024-10-06T14:35:19.2718830Z [10:35:19 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: initial commit
|
|
||||||
2024-10-06T14:35:19.2721212Z [10:35:19 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ The commit should not trigger a release
|
|
||||||
2024-10-06T14:35:19.2723581Z [10:35:19 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analysis of 2 commits complete: minor release
|
|
||||||
2024-10-06T14:35:19.2725655Z [10:35:19 PM] [semantic-release] › ✔ Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
|
|
||||||
2024-10-06T14:35:19.2763390Z [10:35:19 PM] [semantic-release] › ℹ There is no previous release, the next release version is 1.0.0
|
|
||||||
2024-10-06T14:35:19.2784248Z [10:35:19 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
|
|
||||||
2024-10-06T14:35:19.3201938Z [10:35:19 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
|
|
||||||
2024-10-06T14:35:19.3204796Z [10:35:19 PM] [semantic-release] › ℹ Start step "prepare" of plugin "@semantic-release/changelog"
|
|
||||||
2024-10-06T14:35:19.3241468Z [10:35:19 PM] [semantic-release] [@semantic-release/changelog] › ℹ Create /home/runner/work/semantic-release-example/semantic-release-example/CHANGELOG.md
|
|
||||||
2024-10-06T14:35:19.3247876Z [10:35:19 PM] [semantic-release] › ✔ Completed step "prepare" of plugin "@semantic-release/changelog"
|
|
||||||
2024-10-06T14:35:19.3302306Z [10:35:19 PM] [semantic-release] › ℹ Start step "prepare" of plugin "@semantic-release/git"
|
|
||||||
2024-10-06T14:35:19.3374887Z [10:35:19 PM] [semantic-release] [@semantic-release/git] › ℹ Found 1 file(s) to commit
|
|
||||||
2024-10-06T14:35:19.8223732Z [10:35:19 PM] [semantic-release] [@semantic-release/git] › ℹ Prepared Git release: v1.0.0
|
|
||||||
2024-10-06T14:35:19.8224835Z [10:35:19 PM] [semantic-release] › ✔ Completed step "prepare" of plugin "@semantic-release/git"
|
|
||||||
2024-10-06T14:35:19.8265406Z [10:35:19 PM] [semantic-release] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
|
|
||||||
2024-10-06T14:35:19.8404194Z [10:35:19 PM] [semantic-release] › ✔ Completed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
|
|
||||||
2024-10-06T14:35:21.2218523Z [10:35:21 PM] [semantic-release] › ✔ Created tag v1.0.0
|
|
||||||
2024-10-06T14:35:21.2227774Z [10:35:21 PM] [semantic-release] › ✔ Published release 1.0.0 on default channel
|
|
@ -8,6 +8,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@semantic-release/changelog": "^6.0.3",
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
|
"@semantic-release/exec": "^6.0.3",
|
||||||
"@semantic-release/git": "^10.0.1",
|
"@semantic-release/git": "^10.0.1",
|
||||||
"@types/node": "^22.7.4",
|
"@types/node": "^22.7.4",
|
||||||
"semantic-release": "^24.1.2"
|
"semantic-release": "^24.1.2"
|
||||||
|
21
pnpm-lock.yaml
generated
21
pnpm-lock.yaml
generated
@ -15,6 +15,9 @@ importers:
|
|||||||
'@semantic-release/changelog':
|
'@semantic-release/changelog':
|
||||||
specifier: ^6.0.3
|
specifier: ^6.0.3
|
||||||
version: 6.0.3(semantic-release@24.1.2)
|
version: 6.0.3(semantic-release@24.1.2)
|
||||||
|
'@semantic-release/exec':
|
||||||
|
specifier: ^6.0.3
|
||||||
|
version: 6.0.3(semantic-release@24.1.2)
|
||||||
'@semantic-release/git':
|
'@semantic-release/git':
|
||||||
specifier: ^10.0.1
|
specifier: ^10.0.1
|
||||||
version: 10.0.1(semantic-release@24.1.2)
|
version: 10.0.1(semantic-release@24.1.2)
|
||||||
@ -154,6 +157,12 @@ packages:
|
|||||||
resolution: {integrity: sha512-mgdxrHTLOjOddRVYIYDo0fR3/v61GNN1YGkfbrjuIKg/uMgCd+Qzo3UAXJ+woLQQpos4pl5Esuw5A7AoNlzjUQ==}
|
resolution: {integrity: sha512-mgdxrHTLOjOddRVYIYDo0fR3/v61GNN1YGkfbrjuIKg/uMgCd+Qzo3UAXJ+woLQQpos4pl5Esuw5A7AoNlzjUQ==}
|
||||||
engines: {node: '>=18'}
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
|
'@semantic-release/exec@6.0.3':
|
||||||
|
resolution: {integrity: sha512-bxAq8vLOw76aV89vxxICecEa8jfaWwYITw6X74zzlO0mc/Bgieqx9kBRz9z96pHectiTAtsCwsQcUyLYWnp3VQ==}
|
||||||
|
engines: {node: '>=14.17'}
|
||||||
|
peerDependencies:
|
||||||
|
semantic-release: '>=18.0.0'
|
||||||
|
|
||||||
'@semantic-release/git@10.0.1':
|
'@semantic-release/git@10.0.1':
|
||||||
resolution: {integrity: sha512-eWrx5KguUcU2wUPaO6sfvZI0wPafUKAMNC18aXY4EnNcrZL86dEmpNVnC9uMpGZkmZJ9EfCVJBQx4pV4EMGT1w==}
|
resolution: {integrity: sha512-eWrx5KguUcU2wUPaO6sfvZI0wPafUKAMNC18aXY4EnNcrZL86dEmpNVnC9uMpGZkmZJ9EfCVJBQx4pV4EMGT1w==}
|
||||||
engines: {node: '>=14.17'}
|
engines: {node: '>=14.17'}
|
||||||
@ -1408,6 +1417,18 @@ snapshots:
|
|||||||
|
|
||||||
'@semantic-release/error@4.0.0': {}
|
'@semantic-release/error@4.0.0': {}
|
||||||
|
|
||||||
|
'@semantic-release/exec@6.0.3(semantic-release@24.1.2)':
|
||||||
|
dependencies:
|
||||||
|
'@semantic-release/error': 3.0.0
|
||||||
|
aggregate-error: 3.1.0
|
||||||
|
debug: 4.3.7
|
||||||
|
execa: 5.1.1
|
||||||
|
lodash: 4.17.21
|
||||||
|
parse-json: 5.2.0
|
||||||
|
semantic-release: 24.1.2
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
|
||||||
'@semantic-release/git@10.0.1(semantic-release@24.1.2)':
|
'@semantic-release/git@10.0.1(semantic-release@24.1.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@semantic-release/error': 3.0.0
|
'@semantic-release/error': 3.0.0
|
||||||
|
Reference in New Issue
Block a user