Skip to content

Commit bea0443

Browse files
committed
feat: add build-script in inputs for prerelease and release actions
1 parent bcb603d commit bea0443

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

prerelease/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ required permission to operate on protected branches.
4040
| name | description | required | default |
4141
| --- | --- | --- | --- |
4242
| `checkout-repo` | <p>Perform checkout as first step of action</p> | `false` | `true` |
43+
| `build-script` | <p>Custom script to run, should be defined in package.json.</p> | `false` | `build` |
4344
| `checkout-fetch-depth` | <p>The number of commits to fetch. 0 indicates all history for all branches and tags</p> | `false` | `0` |
4445
| `create-prerelease` | <p>Whether semantic-release should create a prerelease or do a dry run. This can be useful to set to true when a prerelease requires pushing artifacts semantic-release is in charge of generating</p> | `false` | `false` |
4546
| `github-token` | <p>GitHub token that can checkout the repository as well as create tags/releases against it. e.g. 'secrets.GITHUB_TOKEN'</p> | `true` | `${{ github.token }}` |

prerelease/action.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ inputs:
99
required: false
1010
description: Perform checkout as first step of action
1111
default: "true"
12+
build-script:
13+
required: false
14+
description: Custom script to run, should be defined in package.json.
15+
default: "build"
1216
checkout-fetch-depth:
1317
required: false
1418
description: The number of commits to fetch. 0 indicates all history for all branches and tags
@@ -153,6 +157,7 @@ runs:
153157
if: steps.check-pr.outputs.has_prerelease_label == 'true'
154158
uses: open-turo/actions-node/build@v6
155159
with:
160+
build-script: ${{ inputs.build-script }}
156161
checkout-repo: false
157162
npm-auth-token: ${{ inputs.npm-auth-token }}
158163
npm-token: ${{ inputs.npm-token }}

release/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ If you are using this action for protected branches, replace `GITHUB_TOKEN` with
5656
| name | description | required | default |
5757
| --- | --- | --- | --- |
5858
| `checkout-repo` | <p>Perform checkout as first step of action</p> | `false` | `true` |
59+
| `build-script` | <p>Custom script to run, should be defined in package.json.</p> | `false` | `build` |
5960
| `checkout-fetch-depth` | <p>The number of commits to fetch. 0 indicates all history for all branches and tags</p> | `false` | `0` |
6061
| `github-token` | <p>GitHub token that can checkout the repository as well as create tags/releases against it. e.g. 'secrets.GITHUB_TOKEN'</p> | `true` | `${{ github.token }}` |
6162
| `docker-config-file` | <p>Path to the docker config file (defaults to .docker-config.json) Must contain imageName, may contain dockerfile.</p> | `false` | `.docker-config.json` |

release/action.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ inputs:
55
required: false
66
description: Perform checkout as first step of action
77
default: "true"
8+
build-script:
9+
required: false
10+
description: Custom script to run, should be defined in package.json.
11+
default: "build"
812
checkout-fetch-depth:
913
required: false
1014
description: The number of commits to fetch. 0 indicates all history for all branches and tags
@@ -71,6 +75,7 @@ runs:
7175
- name: Build
7276
uses: open-turo/actions-node/build@v6
7377
with:
78+
build-script: ${{ inputs.build-script }}
7479
checkout-repo: false
7580
npm-auth-token: ${{ inputs.npm-auth-token }}
7681
npm-token: ${{ inputs.npm-token }}

0 commit comments

Comments
 (0)