mirror of
https://github.com/cycjimmy/semantic-release-action.git
synced 2026-02-08 05:57:23 +00:00
Compare commits
80 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acb3d1c023 | ||
|
|
7922aa4386 | ||
|
|
6e9611f599 | ||
|
|
7aa5b5ea90 | ||
|
|
cabafd6705 | ||
|
|
8dc9474c5c | ||
|
|
c894d87299 | ||
|
|
23f28d6b9a | ||
|
|
8c3e4f586e | ||
|
|
5b8d1ccbaa | ||
|
|
e0b75dd3b9 | ||
|
|
8ebfa72b1f | ||
|
|
7aabe5626b | ||
|
|
132e967011 | ||
|
|
fb28efae68 | ||
|
|
2d010c7798 | ||
|
|
ed948e207e | ||
|
|
14d79a8239 | ||
|
|
b12c8f6015 | ||
|
|
f80bc73384 | ||
|
|
089129701b | ||
|
|
9246c0bd17 | ||
|
|
e878abf189 | ||
|
|
acd6d5df2b | ||
|
|
100d1fb3a3 | ||
|
|
ea00aee834 | ||
|
|
e03fa181e1 | ||
|
|
36bdefbcf6 | ||
|
|
ba330626c4 | ||
|
|
b67d9790a5 | ||
|
|
451bf1fa96 | ||
|
|
ebcbc66374 | ||
|
|
79d9929b57 | ||
|
|
2d054a5550 | ||
|
|
4267eee560 | ||
|
|
8e71605483 | ||
|
|
d0147331ab | ||
|
|
8f46764b73 | ||
|
|
cc1a3d73b8 | ||
|
|
c868a78cfc | ||
|
|
9cc899c47e | ||
|
|
5362fd1cca | ||
|
|
92100d1315 | ||
|
|
78693238b0 | ||
|
|
db700e46d1 | ||
|
|
9a24fc62fd | ||
|
|
fc78113e7a | ||
|
|
16ca923e6c | ||
|
|
5d996b8178 | ||
|
|
b7db0cbbf5 | ||
|
|
8333fcccaa | ||
|
|
d9fa6f1462 | ||
|
|
c4a2fa8906 | ||
|
|
76e103a7e9 | ||
|
|
b52fa1bae5 | ||
|
|
0a51e81a6b | ||
|
|
a41958e8d5 | ||
|
|
9e59817a43 | ||
|
|
266ea7eb8c | ||
|
|
fbe969823c | ||
|
|
57b5211464 | ||
|
|
42e897ae28 | ||
|
|
61851297c0 | ||
|
|
83f817527c | ||
|
|
f6eafe646d | ||
|
|
b8d4c1f503 | ||
|
|
9fae2f3e7c | ||
|
|
85dc1784ae | ||
|
|
d4ecc5e312 | ||
|
|
b2ec2708bf | ||
|
|
5db1928ec0 | ||
|
|
c645b7c93e | ||
|
|
87342657e6 | ||
|
|
2680a8cc39 | ||
|
|
6f0ad41554 | ||
|
|
10d86cb3f4 | ||
|
|
3a4b986343 | ||
|
|
be37becc56 | ||
|
|
f7694d3d64 | ||
|
|
c2149ba279 |
14 changed files with 1856 additions and 6307 deletions
2
.github/workflows/checkPullRequest.yml
vendored
2
.github/workflows/checkPullRequest.yml
vendored
|
|
@ -11,7 +11,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
|
||||||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
@ -46,9 +46,9 @@ jobs:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
- name: Setup Node.js with GitHub Package Registry
|
- name: Setup Node.js with GitHub Package Registry
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 24
|
||||||
registry-url: 'https://npm.pkg.github.com'
|
registry-url: 'https://npm.pkg.github.com'
|
||||||
scope: 'cycjimmy'
|
scope: 'cycjimmy'
|
||||||
|
|
||||||
|
|
|
||||||
4
.github/workflows/testRelease.yml
vendored
4
.github/workflows/testRelease.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
@ -59,7 +59,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
|
||||||
2
LICENSE
2
LICENSE
|
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2019-2020 cycjimmy
|
Copyright (c) 2019-2024 cycjimmy
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
||||||
72
README.md
72
README.md
|
|
@ -18,16 +18,16 @@ GitHub Action for [Semantic Release][semantic-url].
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
uses: cycjimmy/semantic-release-action@v6
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
||||||
**IMPORTANT**: `GITHUB_TOKEN` does not have the required permissions to operate on protected branches.
|
**IMPORTANT**: `GITHUB_TOKEN` does not have the required permissions to operate on protected branches.
|
||||||
If you are using this action for protected branches, replace `GITHUB_TOKEN` with [Personal Access Token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). If using the `@semantic-release/git` plugin for protected branches, avoid persisting credentials as part of `actions/checkout@v4` by setting the parameter `persist-credentials: false`. This credential does not have the required permission to operate on protected branches.
|
If you are using this action for protected branches, replace `GITHUB_TOKEN` with [Personal Access Token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line). If using the `@semantic-release/git` plugin for protected branches, avoid persisting credentials as part of `actions/checkout@v5` by setting the parameter `persist-credentials: false`. This credential does not have the required permission to operate on protected branches.
|
||||||
|
|
||||||
#### Private Packages
|
#### Private Packages
|
||||||
|
|
||||||
|
|
@ -51,6 +51,7 @@ then make sure that you configure this in your `package.json` file:
|
||||||
| extra_plugins | false | Extra plugins for pre-install. [[Details](#extra_plugins)] |
|
| extra_plugins | false | Extra plugins for pre-install. [[Details](#extra_plugins)] |
|
||||||
| dry_run | false | Whether to run semantic release in `dry-run` mode. [[Details](#dry_run)] |
|
| dry_run | false | Whether to run semantic release in `dry-run` mode. [[Details](#dry_run)] |
|
||||||
| ci | false | Whether to run semantic release with CI support. [[Details](#ci)]<br>Support for **semantic-release above v16**. |
|
| ci | false | Whether to run semantic release with CI support. [[Details](#ci)]<br>Support for **semantic-release above v16**. |
|
||||||
|
| unset_gha_env | false | Whether to unset the GITHUB_ACTIONS environment variable. |
|
||||||
| extends | false | Use a sharable configuration [[Details](#extends)] |
|
| extends | false | Use a sharable configuration [[Details](#extends)] |
|
||||||
| working_directory | false | Use another working directory for semantic release [[Details](#working_directory)] |
|
| working_directory | false | Use another working directory for semantic release [[Details](#working_directory)] |
|
||||||
| tag_format | false | Specify format of tag (useful for monorepos) |
|
| tag_format | false | Specify format of tag (useful for monorepos) |
|
||||||
|
|
@ -62,9 +63,9 @@ then make sure that you configure this in your `package.json` file:
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
uses: cycjimmy/semantic-release-action@v6
|
||||||
with:
|
with:
|
||||||
semantic_version: 19.0.5 # It is recommended to specify a version range
|
semantic_version: 19.0.5 # It is recommended to specify a version range
|
||||||
# for semantic-release when using
|
# for semantic-release when using
|
||||||
|
|
@ -74,7 +75,7 @@ steps:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
||||||
If no version range is specified with `cycjimmy/semantic-release-action@v4` then [semantic-release](https://github.com/semantic-release/semantic-release/) version [21.1.1](https://github.com/semantic-release/semantic-release/releases/tag/v21.1.1) is used.
|
If no version range is specified with `cycjimmy/semantic-release-action@v6` then [semantic-release](https://github.com/semantic-release/semantic-release/) version [24.2.7](https://github.com/semantic-release/semantic-release/releases/tag/v25.0.2) is used.
|
||||||
|
|
||||||
#### branches
|
#### branches
|
||||||
> {Optional Input Parameter} The branches on which releases should happen.<br>`branches` supports for **semantic-release above v16**.
|
> {Optional Input Parameter} The branches on which releases should happen.<br>`branches` supports for **semantic-release above v16**.
|
||||||
|
|
@ -82,9 +83,9 @@ If no version range is specified with `cycjimmy/semantic-release-action@v4` then
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
uses: cycjimmy/semantic-release-action@v6
|
||||||
with:
|
with:
|
||||||
semantic_version: 16
|
semantic_version: 16
|
||||||
# you can set branches for semantic-release above v16.
|
# you can set branches for semantic-release above v16.
|
||||||
|
|
@ -128,9 +129,9 @@ See [configuration#branches](https://semantic-release.gitbook.io/semantic-releas
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
uses: cycjimmy/semantic-release-action@v6
|
||||||
with:
|
with:
|
||||||
semantic_version: 15.13.28
|
semantic_version: 15.13.28
|
||||||
# you can set branch for semantic-release older than v16.
|
# you can set branch for semantic-release older than v16.
|
||||||
|
|
@ -153,9 +154,9 @@ Github Action Workflow:
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
uses: cycjimmy/semantic-release-action@v6
|
||||||
with:
|
with:
|
||||||
# You can specify specifying version range for the extra plugins if you prefer.
|
# You can specify specifying version range for the extra plugins if you prefer.
|
||||||
extra_plugins: |
|
extra_plugins: |
|
||||||
|
|
@ -183,9 +184,9 @@ Release Config:
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
uses: cycjimmy/semantic-release-action@v6
|
||||||
with:
|
with:
|
||||||
dry_run: true
|
dry_run: true
|
||||||
env:
|
env:
|
||||||
|
|
@ -199,9 +200,9 @@ steps:
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
uses: cycjimmy/semantic-release-action@v6
|
||||||
with:
|
with:
|
||||||
ci: false
|
ci: false
|
||||||
env:
|
env:
|
||||||
|
|
@ -217,9 +218,9 @@ The action can be used with `extends` option to extend an existing [sharable con
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
uses: cycjimmy/semantic-release-action@v6
|
||||||
with:
|
with:
|
||||||
# You can extend an existing shareable configuration.
|
# You can extend an existing shareable configuration.
|
||||||
# And you can specify version range for the shareable configuration if you prefer.
|
# And you can specify version range for the shareable configuration if you prefer.
|
||||||
|
|
@ -237,9 +238,9 @@ This action run semantic release in the github provided workspace by default. Yo
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
uses: cycjimmy/semantic-release-action@v6
|
||||||
with:
|
with:
|
||||||
# You can select another working directory like a subdirectory for example.
|
# You can select another working directory like a subdirectory for example.
|
||||||
working_directory: ./code
|
working_directory: ./code
|
||||||
|
|
@ -254,9 +255,9 @@ The default tag format on semantic-release is `v{version}`. You can override tha
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
uses: cycjimmy/semantic-release-action@v6
|
||||||
with:
|
with:
|
||||||
tag_format: custom-v${version}
|
tag_format: custom-v${version}
|
||||||
env:
|
env:
|
||||||
|
|
@ -264,6 +265,29 @@ steps:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### unset_gha_env
|
||||||
|
Setting this to true will unset the `GITHUB_ACTIONS` environment variable. This can be useful when wanting to validate things such as merging of a PR would create a valid release.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
- name: Temporarily merge PR branch
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
run: |
|
||||||
|
git config --global user.name github-actions
|
||||||
|
git config --global user.email github-actions@github.com
|
||||||
|
git merge --no-ff origin/${{ github.event.pull_request.head.ref }} --message "${{ github.event.pull_request.title }}"
|
||||||
|
- name: Semantic Release
|
||||||
|
uses: cycjimmy/semantic-release-action@v6
|
||||||
|
with:
|
||||||
|
unset_gha_env: ${{ github.event_name == 'pull_request' }}
|
||||||
|
ci: ${{ github.event_name == 'pull_request' && false || '' }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
### Outputs
|
### Outputs
|
||||||
| Output Parameter | Description |
|
| Output Parameter | Description |
|
||||||
|:-------------------------:|-----------------------------------------------------------------------------------------------------------------------------------|
|
|:-------------------------:|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
|
@ -284,9 +308,9 @@ steps:
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Semantic Release
|
- name: Semantic Release
|
||||||
uses: cycjimmy/semantic-release-action@v4
|
uses: cycjimmy/semantic-release-action@v6
|
||||||
id: semantic # Need an `id` for output variables
|
id: semantic # Need an `id` for output variables
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ inputs:
|
||||||
ci:
|
ci:
|
||||||
required: false
|
required: false
|
||||||
description: 'Whether to run semantic release with CI support (default: true). It will override the ci attribute in your configuration file'
|
description: 'Whether to run semantic release with CI support (default: true). It will override the ci attribute in your configuration file'
|
||||||
|
unset_gha_env:
|
||||||
|
required: false
|
||||||
|
description: 'Whether to unset the GITHUB_ACTIONS environment variable. This can be useful when trying to run semantic-release as part of PR checks.'
|
||||||
extends:
|
extends:
|
||||||
required: false
|
required: false
|
||||||
description: 'One or several sharable configurations, https://semantic-release.gitbook.io/semantic-release/usage/configuration#extends'
|
description: 'One or several sharable configurations, https://semantic-release.gitbook.io/semantic-release/usage/configuration#extends'
|
||||||
|
|
@ -61,5 +64,5 @@ outputs:
|
||||||
last_release_git_tag:
|
last_release_git_tag:
|
||||||
description: 'The Git tag associated with the last release, if there was one.'
|
description: 'The Git tag associated with the last release, if there was one.'
|
||||||
runs:
|
runs:
|
||||||
using: 'node20'
|
using: 'node24'
|
||||||
main: 'index.js'
|
main: 'index.js'
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,62 @@
|
||||||
|
# [6.0.0](https://github.com/cycjimmy/semantic-release-action/compare/v5.0.2...v6.0.0) (2025-11-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **deps:** update semantic-release to version 25 ([9246c0b](https://github.com/cycjimmy/semantic-release-action/commit/9246c0bd17405b1f20450501f39234912258bc50))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* **deps:** Update semantic-release to version 25
|
||||||
|
|
||||||
|
## [5.0.2](https://github.com/cycjimmy/semantic-release-action/compare/v5.0.1...v5.0.2) (2025-10-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* further fix of result handling in windUpJob.task.js ([451bf1f](https://github.com/cycjimmy/semantic-release-action/commit/451bf1fa96343272b4efadb5731fe2e25073d24f)), closes [#264](https://github.com/cycjimmy/semantic-release-action/issues/264)
|
||||||
|
|
||||||
|
## [5.0.1](https://github.com/cycjimmy/semantic-release-action/compare/v5.0.0...v5.0.1) (2025-10-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* improves result handling in windUpJob.task.js ([4267eee](https://github.com/cycjimmy/semantic-release-action/commit/4267eee56034cc3ee6f2fef9bdc3cc125ca073db))
|
||||||
|
|
||||||
|
# [5.0.0](https://github.com/cycjimmy/semantic-release-action/compare/v4.2.2...v5.0.0) (2025-08-30)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* update node version on runner to 24 ([7869323](https://github.com/cycjimmy/semantic-release-action/commit/78693238b0cffcbd79484ca9c3f634c6d1e3978a))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* this action now runs using node 24
|
||||||
|
|
||||||
|
## [4.2.2](https://github.com/cycjimmy/semantic-release-action/compare/v4.2.1...v4.2.2) (2025-07-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **cleanupNpmrc.task.js:** Use @actions/io to remove .npmrc ([b7db0cb](https://github.com/cycjimmy/semantic-release-action/commit/b7db0cbbf5f42eb8fe027828c236fbc340b5429e))
|
||||||
|
|
||||||
|
## [4.2.1](https://github.com/cycjimmy/semantic-release-action/compare/v4.2.0...v4.2.1) (2025-06-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* update marked terminal to v7.3.0 ([b52fa1b](https://github.com/cycjimmy/semantic-release-action/commit/b52fa1bae5b892a36c1e01fab61457344cc0c494))
|
||||||
|
|
||||||
|
# [4.2.0](https://github.com/cycjimmy/semantic-release-action/compare/v4.1.1...v4.2.0) (2025-03-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add ability to unset GITHUB_ACTION env var ([266ea7e](https://github.com/cycjimmy/semantic-release-action/commit/266ea7eb8c90943aa9cddd3b0ed326d5e8784a26))
|
||||||
|
|
||||||
## [4.1.1](https://github.com/cycjimmy/semantic-release-action/compare/v4.1.0...v4.1.1) (2024-09-25)
|
## [4.1.1](https://github.com/cycjimmy/semantic-release-action/compare/v4.1.0...v4.1.1) (2024-09-25)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
7968
package-lock.json
generated
7968
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@cycjimmy/semantic-release-action",
|
"name": "@cycjimmy/semantic-release-action",
|
||||||
"version": "4.1.1",
|
"version": "6.0.0",
|
||||||
"description": "GitHub Action for Semantic Release",
|
"description": "GitHub Action for Semantic Release",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
@ -21,10 +21,11 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/cycjimmy/semantic-release-action#readme",
|
"homepage": "https://github.com/cycjimmy/semantic-release-action#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^2.0.0",
|
||||||
|
"@actions/io": "^2.0.0",
|
||||||
"@cycjimmy/awesome-js-funcs": "^4.0.9",
|
"@cycjimmy/awesome-js-funcs": "^4.0.9",
|
||||||
"@semantic-release/changelog": "^6.0.3",
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
"@semantic-release/git": "^10.0.1",
|
"@semantic-release/git": "^10.0.1",
|
||||||
"semantic-release": "^24.1.1"
|
"semantic-release": "^25.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,9 @@
|
||||||
const core = require('@actions/core');
|
const io = require('@actions/io');
|
||||||
const exec = require('./_exec');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up `.npmrc` file in the repo after releasing
|
* Clean up `.npmrc` file in the repo after releasing
|
||||||
* @returns {Promise<never>}
|
* @returns {Promise<never>}
|
||||||
*/
|
*/
|
||||||
module.exports = async () => {
|
module.exports = async () => {
|
||||||
const {stdout, stderr} = await exec(`rm -f .npmrc`);
|
await io.rmRF('.npmrc');
|
||||||
core.debug(stdout);
|
|
||||||
|
|
||||||
if (stderr) {
|
|
||||||
return Promise.reject(stderr);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -126,8 +126,8 @@ exports.handleRepositoryUrlOption = () => {
|
||||||
core.debug(`repository_url input: ${repositoryUrl}`);
|
core.debug(`repository_url input: ${repositoryUrl}`);
|
||||||
|
|
||||||
if (repositoryUrl) {
|
if (repositoryUrl) {
|
||||||
return { r: repositoryUrl };
|
return { r: repositoryUrl };
|
||||||
} else {
|
} else {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,11 @@ const release = async () => {
|
||||||
await preInstall(core.getInput(inputs.extra_plugins));
|
await preInstall(core.getInput(inputs.extra_plugins));
|
||||||
await preInstall(core.getInput(inputs.extends));
|
await preInstall(core.getInput(inputs.extends));
|
||||||
|
|
||||||
|
if (core.getInput(inputs.unset_gha_env) === 'true') {
|
||||||
|
core.debug('Unset GITHUB_ACTIONS environment variable');
|
||||||
|
delete process.env.GITHUB_ACTIONS;
|
||||||
|
}
|
||||||
|
|
||||||
const semanticRelease = await import('semantic-release');
|
const semanticRelease = await import('semantic-release');
|
||||||
const result = await semanticRelease.default({
|
const result = await semanticRelease.default({
|
||||||
...handleBranchesOption(),
|
...handleBranchesOption(),
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
"extra_plugins": "extra_plugins",
|
"extra_plugins": "extra_plugins",
|
||||||
"dry_run": "dry_run",
|
"dry_run": "dry_run",
|
||||||
"ci": "ci",
|
"ci": "ci",
|
||||||
|
"unset_gha_env": "unset_gha_env",
|
||||||
"extends": "extends",
|
"extends": "extends",
|
||||||
"working_directory": "working_directory",
|
"working_directory": "working_directory",
|
||||||
"tag_format": "tag_format",
|
"tag_format": "tag_format",
|
||||||
|
|
|
||||||
|
|
@ -7,23 +7,29 @@ const outputs = require('./outputs.json');
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
module.exports = async (result) => {
|
module.exports = async (result) => {
|
||||||
if (!result) {
|
const resolved = await result;
|
||||||
|
if (!resolved) {
|
||||||
core.debug('No release published.');
|
core.debug('No release published.');
|
||||||
return Promise.resolve();
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const {lastRelease, commits, nextRelease, releases} = await result;
|
const {
|
||||||
|
lastRelease = {},
|
||||||
|
commits = [],
|
||||||
|
nextRelease = {},
|
||||||
|
releases = [],
|
||||||
|
} = resolved;
|
||||||
|
|
||||||
if (lastRelease.version) {
|
if (lastRelease?.version) {
|
||||||
core.debug(`The last release was "${lastRelease.version}".`);
|
core.debug(`The last release was "${lastRelease.version}".`);
|
||||||
core.setOutput(outputs.last_release_version, lastRelease.version);
|
core.setOutput(outputs.last_release_version, lastRelease.version);
|
||||||
core.setOutput(outputs.last_release_git_head, lastRelease.gitHead);
|
core.setOutput(outputs.last_release_git_head, lastRelease.gitHead);
|
||||||
core.setOutput(outputs.last_release_git_tag, lastRelease.gitTag);
|
core.setOutput(outputs.last_release_git_tag, lastRelease.gitTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!nextRelease) {
|
if (!nextRelease?.version) {
|
||||||
core.debug('No release published.');
|
core.debug('No release published.');
|
||||||
return Promise.resolve();
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
core.debug(`Published ${nextRelease.type} release version ${nextRelease.version} containing ${commits.length} commits.`);
|
core.debug(`Published ${nextRelease.type} release version ${nextRelease.version} containing ${commits.length} commits.`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue