You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: action.yml
+21-19Lines changed: 21 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -13,30 +13,30 @@ inputs:
13
13
required: false
14
14
description: "JavaScript regex used to filter releases."
15
15
default: "/.*/g"
16
-
release_id:
16
+
tag:
17
17
required: false
18
-
description: "The ID of the release. Defaults to `github.event.release.id`."
18
+
description: "The git tag used to determine the release. If omitted, the release will be determined from `github.event.release.id`."
19
19
default: ""
20
20
runs:
21
21
using: "composite"
22
22
steps:
23
23
- uses: actions/github-script@v7
24
24
env:
25
-
INPUT_RELEASE_ID: ${{ inputs.release_id }}
25
+
TAG: ${{ inputs.release_id }}
26
26
with:
27
27
result-encoding: string
28
28
retries: ${{ inputs.retries }}
29
29
script: |
30
-
const { INPUT_RELEASE_ID } = process.env
30
+
const { TAG } = process.env
31
31
32
32
switch(context.eventName) {
33
33
case ('release'):
34
34
break;
35
35
case ('workflow_run'):
36
36
core.warning("This action is designed to run on 'release', not 'workflow_run'. Even when corresponding to a workflow triggered by 'release', 'workflow_run' may not work due to its event context schema.");
37
37
break;
38
-
case ('pull_request' && INPUT_RELEASE_ID):
39
-
core.error("This action is meant to only run on 'release'. 'pull_request' is reserved for testing, and 'release_id' was not supplied.");
38
+
case ('pull_request' && INPUT_RELEASE_NAME):
39
+
core.error("This action is meant to only run on 'release'. 'pull_request' is reserved for testing, and 'tag' was not supplied.");
40
40
break;
41
41
case ('pull_request'):
42
42
core.warning("This action is meant to only run on 'release'. 'pull_request' is reserved for testing.");
@@ -76,22 +76,24 @@ runs:
76
76
});
77
77
}
78
78
79
-
releaseID = INPUT_RELEASE_ID;
80
-
if (!releaseID) {
81
-
console.log("Fetching release ID from GitHub context...");
0 commit comments