5
0
Fork 0
mirror of https://github.com/cycjimmy/semantic-release-action.git synced 2025-11-07 10:46:56 +00:00

docs: update the actions version in the README (#255)

This commit is contained in:
Geoffrey.C 2025-09-04 16:20:38 +08:00
parent 9cc899c47e
commit c868a78cfc

View file

@ -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@v5
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
@ -63,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@v5
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
@ -75,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@v5` then [semantic-release](https://github.com/semantic-release/semantic-release/) version [24.2.7](https://github.com/semantic-release/semantic-release/releases/tag/v24.2.7) 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**.
@ -83,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@v5
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.
@ -129,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@v5
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.
@ -154,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@v5
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: |
@ -184,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@v5
with: with:
dry_run: true dry_run: true
env: env:
@ -200,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@v5
with: with:
ci: false ci: false
env: env:
@ -218,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@v5
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.
@ -238,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@v5
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
@ -255,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@v5
with: with:
tag_format: custom-v${version} tag_format: custom-v${version}
env: env:
@ -271,7 +271,7 @@ Setting this to true will unset the `GITHUB_ACTIONS` environment variable. This
```yaml ```yaml
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Temporarily merge PR branch - name: Temporarily merge PR branch
if: ${{ github.event_name == 'pull_request' }} if: ${{ github.event_name == 'pull_request' }}
run: | run: |
@ -279,7 +279,7 @@ steps:
git config --global user.email github-actions@github.com 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 }}" git merge --no-ff origin/${{ github.event.pull_request.head.ref }} --message "${{ github.event.pull_request.title }}"
- name: Semantic Release - name: Semantic Release
uses: cycjimmy/semantic-release-action@v4 uses: cycjimmy/semantic-release-action@v5
with: with:
unset_gha_env: ${{ github.event_name == 'pull_request' }} unset_gha_env: ${{ github.event_name == 'pull_request' }}
ci: ${{ github.event_name == 'pull_request' && false || '' }} ci: ${{ github.event_name == 'pull_request' && false || '' }}
@ -308,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@v5
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 }}