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: README.md
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,8 @@ Optional Arguments
19
19
-`overwrite`: If an asset with the same name already exists, overwrite it (Default: `false`).
20
20
-`prerelease`: Mark the release as a pre-release (Default: `false`).
21
21
-`release_name`: Explicitly set a release name. (Defaults: implicitly same as `tag` via GitHub API).
22
-
-`body`: Content of the release text (Defaut: `""`).
22
+
-`body`: Content of the release text (Default: `""`).
23
+
-`repo_name`: Specify the name of the GitHub repository in which the GitHub release will be created, edited, and deleted. If the repository is other than the current, it is required to create a personal access token with `repo`, `user`, `admin:repo_hook` scopes to the foreign repository and add it as a secret. (Default: current repository).
23
24
24
25
## Output variables
25
26
@@ -101,12 +102,14 @@ jobs:
101
102
```
102
103
103
104
Example with `file_glob`:
105
+
104
106
```yaml
105
107
name: Publish
106
108
on:
107
109
push:
108
110
tags:
109
111
- '*'
112
+
110
113
jobs:
111
114
build:
112
115
name: Publish binaries
@@ -125,6 +128,39 @@ jobs:
125
128
file_glob: true
126
129
```
127
130
131
+
Example for creating a release in a foreign repository using `repo_name`:
132
+
133
+
```yaml
134
+
name: Publish
135
+
136
+
on:
137
+
push:
138
+
tags:
139
+
- '*'
140
+
141
+
jobs:
142
+
build:
143
+
name: Publish binaries
144
+
runs-on: ubuntu-latest
145
+
146
+
steps:
147
+
- uses: actions/checkout@v2
148
+
- name: Build
149
+
run: cargo build --release
150
+
- name: Upload binaries to release
151
+
uses: svenstaro/upload-release-action@v2
152
+
with:
153
+
repo_name: owner/repository-name
154
+
# A personal access token for the GitHub repository in which the release will be created and edited.
155
+
# It is recommended to create the access token with the following scopes: `repo, user, admin:repo_hook`.
Copy file name to clipboardExpand all lines: action.yml
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ inputs:
26
26
description: 'Explicitly set a release name. Defaults to empty which will cause the release to take the tag as name on GitHub.'
27
27
body:
28
28
description: 'Content of the release text. Empty by default.'
29
+
repo_name:
30
+
description: 'Specify the name of the GitHub repository in which the GitHub release will be created, edited, and deleted. If the repository is other than the current, it is required to create a personal access token with `repo`, `user`, `admin:repo_hook` scopes to the foreign repository and add it as a secret. Defaults to the current repository'
29
31
outputs:
30
32
browser_download_url:
31
33
description: 'The publicly available URL of the asset.'
0 commit comments