File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed
Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ # Release: Upload Asset
2+
3+ Upload files to a GitHub release.
4+
5+ ## Example Usage
6+
7+ ``` yaml
8+ # …
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+ release-id : 123456 # Optional for `release` events.
16+ files : |
17+ path/to/file.txt; type=text/plain; name=File1.txt
18+ path/to/foo/bar.baz; if=${{ github.event_name == 'release' }}
19+ ` ` `
20+
21+ ## Inputs
22+
23+ ### ` release-id`
24+
25+ The ID of the release to which to upload files.
26+
27+ This is optional for `release` events, in which case the ID can be inferred (if left unset) from the release that
28+ triggered the workflow.
29+
30+ # ## `files`
31+
32+ Paths to the files to upload. Separated by newline.
33+
34+ After the file path, you can add parameters separated by semicolons.
35+
36+ The recognised parameters are :
37+
38+ <dl>
39+ <dt><code>type</code></dt>
40+ <dd>The MIME type of the file. Defaults to <code>application/octet-stream</code>.
41+ <dt><code>name</code></dt>
42+ <dd>The name of the file. Defaults to the basename of the file path.</dd>
43+ <dt><code>if</code></dt>
44+ <dd>Whether to actually upload this file. You can use this in combination with
45+ <a href="https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions">GitHub expressions</a>.
46+ The allowed values are <code>true</code> and <code>false</code>. Defaults to <code>true</code>.
47+ </dd>
48+ </dl>
49+
50+ Examples :
51+
52+ ` ` ` yaml
53+ files: |-
54+ /path/to/file1.txt
55+ /path/to/file2.txt; type=text/plain; name=Named File.txt
56+ /path/to/file3.txt; if=${{ 'foo' == 'bar' }}
57+ ` ` `
58+
59+
60+
You can’t perform that action at this time.
0 commit comments