Skip to content

Commit 101f71a

Browse files
committed
document required contents: write permission
1 parent 2046f79 commit 101f71a

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

README.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@ Upload files to a GitHub release.
66

77
```yaml
88
#
9-
steps:
10-
#
11-
- name: Upload to release
12-
uses: cloudnode-pro/[email protected]
13-
with:
14-
# See the ‘Inputs’ section below for details.
15-
gh-token: ${{ github.token }}
16-
release-id: 123456 # Optional for `release` events.
17-
files: |
18-
path/to/file.txt; type=text/plain; name=File1.txt
19-
path/to/foo/bar.baz; if=${{ github.event_name == 'release' }}
9+
jobs:
10+
publish:
11+
#
12+
permissions:
13+
contents: write
14+
#
15+
steps:
16+
#
17+
- name: Upload to release
18+
uses: cloudnode-pro/[email protected]
19+
with:
20+
# See the ‘Inputs’ section below for details.
21+
gh-token: ${{ github.token }}
22+
release-id: 123456 # Optional for `release` events.
23+
files: |
24+
path/to/file.txt; type=text/plain; name=File1.txt
25+
path/to/foo/bar.baz; if=${{ github.event_name == 'release' }}
2026
```
2127
2228
## Inputs
@@ -65,5 +71,15 @@ files: |-
6571
/path/to/file3.txt; if=${{ 'foo' == 'bar' }}
6672
```
6773

74+
### Permissions
6875

76+
Uploading release assets requires the `contents: write`.
6977

78+
See: [Controlling permissions for GITHUB_TOKEN](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token)
79+
80+
Example:
81+
82+
```yaml
83+
permissions:
84+
contents: write
85+
```

0 commit comments

Comments
 (0)