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
+19-19Lines changed: 19 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Upload-Artifact v2
1
+
# Upload-Artifact v3
2
2
3
3
This uploads artifacts from your workflow allowing you to share data between jobs and store data once a workflow is complete.
4
4
@@ -34,7 +34,7 @@ steps:
34
34
35
35
- run: echo hello > path/to/artifact/world.txt
36
36
37
-
- uses: actions/upload-artifact@v2
37
+
- uses: actions/upload-artifact@v3
38
38
with:
39
39
name: my-artifact
40
40
path: path/to/artifact/world.txt
@@ -43,7 +43,7 @@ steps:
43
43
### Upload an Entire Directory
44
44
45
45
```yaml
46
-
- uses: actions/upload-artifact@v2
46
+
- uses: actions/upload-artifact@v3
47
47
with:
48
48
name: my-artifact
49
49
path: path/to/artifact/ # or path/to/artifact
@@ -52,7 +52,7 @@ steps:
52
52
### Upload using a Wildcard Pattern
53
53
54
54
```yaml
55
-
- uses: actions/upload-artifact@v2
55
+
- uses: actions/upload-artifact@v3
56
56
with:
57
57
name: my-artifact
58
58
path: path/**/[abc]rtifac?/*
@@ -61,7 +61,7 @@ steps:
61
61
### Upload using Multiple Paths and Exclusions
62
62
63
63
```yaml
64
-
- uses: actions/upload-artifact@v2
64
+
- uses: actions/upload-artifact@v3
65
65
with:
66
66
name: my-artifact
67
67
path: |
@@ -97,7 +97,7 @@ The [@actions/artifact](https://github.com/actions/toolkit/tree/main/packages/ar
97
97
If a path (or paths), result in no files being found for the artifact, the action will succeed but print out a warning. In certain scenarios it may be desirable to fail the action or suppress the warning. The `if-no-files-found` option allows you to customize the behavior of the action if no files are found:
98
98
99
99
```yaml
100
-
- uses: actions/upload-artifact@v2
100
+
- uses: actions/upload-artifact@v3
101
101
with:
102
102
name: my-artifact
103
103
path: path/to/artifact/
@@ -109,7 +109,7 @@ If a path (or paths), result in no files being found for the artifact, the actio
109
109
To upload artifacts only when the previous step of a job failed, use [`if: failure()`](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#job-status-check-functions):
110
110
111
111
```yaml
112
-
- uses: actions/upload-artifact@v2
112
+
- uses: actions/upload-artifact@v3
113
113
if: failure()
114
114
with:
115
115
name: my-artifact
@@ -121,7 +121,7 @@ To upload artifacts only when the previous step of a job failed, use [`if: failu
121
121
You can upload an artifact without specifying a name
122
122
123
123
```yaml
124
-
- uses: actions/upload-artifact@v2
124
+
- uses: actions/upload-artifact@v3
125
125
with:
126
126
path: path/to/artifact/world.txt
127
127
```
@@ -134,17 +134,17 @@ With the following example, the available artifact (named `artifact` by default
134
134
135
135
```yaml
136
136
- run: echo hi > world.txt
137
-
- uses: actions/upload-artifact@v2
137
+
- uses: actions/upload-artifact@v3
138
138
with:
139
139
path: world.txt
140
140
141
141
- run: echo howdy > extra-file.txt
142
-
- uses: actions/upload-artifact@v2
142
+
- uses: actions/upload-artifact@v3
143
143
with:
144
144
path: extra-file.txt
145
145
146
146
- run: echo hello > world.txt
147
-
- uses: actions/upload-artifact@v2
147
+
- uses: actions/upload-artifact@v3
148
148
with:
149
149
path: world.txt
150
150
```
@@ -159,7 +159,7 @@ Each artifact behaves as a file share. Uploading to the same artifact multiple t
- name: Accidentally upload to the same artifact via multiple jobs
162
-
uses: actions/upload-artifact@v2
162
+
uses: actions/upload-artifact@v3
163
163
with:
164
164
name: my-artifact
165
165
path: ${{ github.workspace }}
@@ -170,7 +170,7 @@ Each artifact behaves as a file share. Uploading to the same artifact multiple t
170
170
In the above example, four jobs will upload four different files to the same artifact but there will only be one file available when `my-artifact` is downloaded. Each job overwrites what was previously uploaded. To ensure that jobs don't overwrite existing artifacts, use a different name per job:
171
171
172
172
```yaml
173
-
uses: actions/upload-artifact@v2
173
+
uses: actions/upload-artifact@v3
174
174
with:
175
175
name: my-artifact ${{ matrix.node-version }}
176
176
path: ${{ github.workspace }}
@@ -184,9 +184,9 @@ You can use `~` in the path input as a substitute for `$HOME`. Basic tilde expan
184
184
- run: |
185
185
mkdir -p ~/new/artifact
186
186
echo hello > ~/new/artifact/world.txt
187
-
- uses: actions/upload-artifact@v2
187
+
- uses: actions/upload-artifact@v3
188
188
with:
189
-
name: Artifacts-V2
189
+
name: Artifacts-V3
190
190
path: ~/new/**/*
191
191
```
192
192
@@ -199,7 +199,7 @@ Environment variables along with context expressions can also be used for input.
0 commit comments