mirror of
				https://github.com/actions/upload-artifact.git
				synced 2025-10-31 14:10:55 +00:00 
			
		
		
		
	Merge branch 'main' into remove-trailing-ws
This commit is contained in:
		
				commit
				
					
						11f0bb90ac
					
				
			
		
					 16 changed files with 16578 additions and 23542 deletions
				
			
		
							
								
								
									
										6
									
								
								.devcontainer/devcontainer.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.devcontainer/devcontainer.json
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,6 @@ | ||||||
|  | // For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||||||
|  | // README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node | ||||||
|  | { | ||||||
|  | 	"name": "@actions/upload-artifact", | ||||||
|  | 	"image": "mcr.microsoft.com/devcontainers/typescript-node:0-16" | ||||||
|  | } | ||||||
|  | @ -4,13 +4,10 @@ | ||||||
|     "parserOptions": { "ecmaVersion": 9, "sourceType": "module" }, |     "parserOptions": { "ecmaVersion": 9, "sourceType": "module" }, | ||||||
|     "extends": [ |     "extends": [ | ||||||
|       "eslint:recommended", |       "eslint:recommended", | ||||||
|       "plugin:@typescript-eslint/eslint-recommended", |  | ||||||
|       "plugin:@typescript-eslint/recommended", |  | ||||||
|       "plugin:import/errors", |       "plugin:import/errors", | ||||||
|       "plugin:import/warnings", |       "plugin:import/warnings", | ||||||
|       "plugin:import/typescript", |       "plugin:import/typescript", | ||||||
|       "plugin:prettier/recommended", |       "plugin:prettier/recommended" | ||||||
|       "prettier/@typescript-eslint" |  | ||||||
|     ], |     ], | ||||||
|     "rules": { |     "rules": { | ||||||
|        "@typescript-eslint/no-empty-function": "off" |        "@typescript-eslint/no-empty-function": "off" | ||||||
|  |  | ||||||
							
								
								
									
										16
									
								
								.github/workflows/check-dist.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								.github/workflows/check-dist.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -20,19 +20,23 @@ jobs: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v2 |       - uses: actions/checkout@v3 | ||||||
| 
 | 
 | ||||||
|       - name: Set Node.js 12.x |       - name: Setup Node 16 | ||||||
|         uses: actions/setup-node@v1 |         uses: actions/setup-node@v3 | ||||||
|         with: |         with: | ||||||
|           node-version: 12.x |           node-version: 16.x | ||||||
| 
 |           cache: 'npm' | ||||||
|  |    | ||||||
|       - name: Install dependencies |       - name: Install dependencies | ||||||
|         run: npm ci |         run: npm ci | ||||||
| 
 | 
 | ||||||
|       - name: Move the committed index.js file |       - name: Move the committed index.js file | ||||||
|         run: mv dist/index.js /tmp |         run: mv dist/index.js /tmp | ||||||
| 
 | 
 | ||||||
|  |       - name: Rebuild with tsc | ||||||
|  |         run: npm run build | ||||||
|  | 
 | ||||||
|       - name: Rebuild the index.js file |       - name: Rebuild the index.js file | ||||||
|         run: npm run release |         run: npm run release | ||||||
| 
 | 
 | ||||||
|  | @ -41,7 +45,7 @@ jobs: | ||||||
|         id: diff |         id: diff | ||||||
| 
 | 
 | ||||||
|       # If index.js was different than expected, upload the expected version as an artifact |       # If index.js was different than expected, upload the expected version as an artifact | ||||||
|       - uses: actions/upload-artifact@v2 |       - uses: actions/upload-artifact@v3 | ||||||
|         if: ${{ failure() && steps.diff.conclusion == 'failure' }} |         if: ${{ failure() && steps.diff.conclusion == 'failure' }} | ||||||
|         with: |         with: | ||||||
|           name: index.js |           name: index.js | ||||||
|  |  | ||||||
							
								
								
									
										8
									
								
								.github/workflows/codeql-analysis.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/codeql-analysis.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -17,11 +17,11 @@ jobs: | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|     - name: Checkout repository |     - name: Checkout repository | ||||||
|       uses: actions/checkout@v2 |       uses: actions/checkout@v3 | ||||||
| 
 | 
 | ||||||
|     # Initializes the CodeQL tools for scanning. |     # Initializes the CodeQL tools for scanning. | ||||||
|     - name: Initialize CodeQL |     - name: Initialize CodeQL | ||||||
|       uses: github/codeql-action/init@v1 |       uses: github/codeql-action/init@v2 | ||||||
|       # Override language selection by uncommenting this and choosing your languages |       # Override language selection by uncommenting this and choosing your languages | ||||||
|       # with: |       # with: | ||||||
|       #   languages: go, javascript, csharp, python, cpp, java |       #   languages: go, javascript, csharp, python, cpp, java | ||||||
|  | @ -29,7 +29,7 @@ jobs: | ||||||
|     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java). |     # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java). | ||||||
|     # If this step fails, then you should remove it and run the build manually (see below) |     # If this step fails, then you should remove it and run the build manually (see below) | ||||||
|     - name: Autobuild |     - name: Autobuild | ||||||
|       uses: github/codeql-action/autobuild@v1 |       uses: github/codeql-action/autobuild@v2 | ||||||
| 
 | 
 | ||||||
|     # ℹ️ Command-line programs to run using the OS shell. |     # ℹ️ Command-line programs to run using the OS shell. | ||||||
|     # 📚 https://git.io/JvXDl |     # 📚 https://git.io/JvXDl | ||||||
|  | @ -43,4 +43,4 @@ jobs: | ||||||
|     #   make release |     #   make release | ||||||
| 
 | 
 | ||||||
|     - name: Perform CodeQL Analysis |     - name: Perform CodeQL Analysis | ||||||
|       uses: github/codeql-action/analyze@v1 |       uses: github/codeql-action/analyze@v2 | ||||||
|  |  | ||||||
|  | @ -22,7 +22,7 @@ jobs: | ||||||
|     steps: |     steps: | ||||||
|     - name: Update the ${{ env.TAG_NAME }} tag |     - name: Update the ${{ env.TAG_NAME }} tag | ||||||
|       id: update-major-tag |       id: update-major-tag | ||||||
|       uses: actions/publish-action@v0.1.0 |       uses: actions/publish-action@v0.2.1 | ||||||
|       with: |       with: | ||||||
|         source-tag: ${{ env.TAG_NAME }} |         source-tag: ${{ env.TAG_NAME }} | ||||||
|         slack-webhook: ${{ secrets.SLACK_WEBHOOK }} |         slack-webhook: ${{ secrets.SLACK_WEBHOOK }} | ||||||
|  |  | ||||||
							
								
								
									
										25
									
								
								.github/workflows/test.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										25
									
								
								.github/workflows/test.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -23,12 +23,13 @@ jobs: | ||||||
| 
 | 
 | ||||||
|     steps: |     steps: | ||||||
|     - name: Checkout |     - name: Checkout | ||||||
|       uses: actions/checkout@v2 |       uses: actions/checkout@v3 | ||||||
| 
 | 
 | ||||||
|     - name: Set Node.js 12.x |     - name: Setup Node 16 | ||||||
|       uses: actions/setup-node@v1 |       uses: actions/setup-node@v3 | ||||||
|       with: |       with: | ||||||
|         node-version: 12.x |         node-version: 16.x | ||||||
|  |         cache: 'npm' | ||||||
| 
 | 
 | ||||||
|     - name: Install dependencies |     - name: Install dependencies | ||||||
|       run: npm ci |       run: npm ci | ||||||
|  | @ -36,15 +37,15 @@ jobs: | ||||||
|     - name: Compile |     - name: Compile | ||||||
|       run: npm run build |       run: npm run build | ||||||
| 
 | 
 | ||||||
|     - name: npm test |  | ||||||
|       run: npm test |  | ||||||
| 
 |  | ||||||
|     - name: Lint |     - name: Lint | ||||||
|       run: npm run lint |       run: npm run lint | ||||||
| 
 | 
 | ||||||
|     - name: Format |     - name: Format | ||||||
|       run: npm run format-check |       run: npm run format-check | ||||||
| 
 | 
 | ||||||
|  |     - name: Test | ||||||
|  |       run: npm run test | ||||||
|  | 
 | ||||||
|     # Test end-to-end by uploading two artifacts and then downloading them |     # Test end-to-end by uploading two artifacts and then downloading them | ||||||
|     - name: Create artifact files |     - name: Create artifact files | ||||||
|       run: | |       run: | | ||||||
|  | @ -85,11 +86,9 @@ jobs: | ||||||
|           path/to/dir-[23]/* |           path/to/dir-[23]/* | ||||||
|           !path/to/dir-3/*.txt |           !path/to/dir-3/*.txt | ||||||
| 
 | 
 | ||||||
|     # Verify artifacts. Switch to download-artifact@v2 once it's out of preview |  | ||||||
| 
 |  | ||||||
|     # Download Artifact #1 and verify the correctness of the content |     # Download Artifact #1 and verify the correctness of the content | ||||||
|     - name: 'Download artifact #1' |     - name: 'Download artifact #1' | ||||||
|       uses: actions/download-artifact@v1 |       uses: actions/download-artifact@v3 | ||||||
|       with: |       with: | ||||||
|         name: 'Artifact-A' |         name: 'Artifact-A' | ||||||
|         path: some/new/path |         path: some/new/path | ||||||
|  | @ -109,7 +108,7 @@ jobs: | ||||||
| 
 | 
 | ||||||
|     # Download Artifact #2 and verify the correctness of the content |     # Download Artifact #2 and verify the correctness of the content | ||||||
|     - name: 'Download artifact #2' |     - name: 'Download artifact #2' | ||||||
|       uses: actions/download-artifact@v1 |       uses: actions/download-artifact@v3 | ||||||
|       with: |       with: | ||||||
|         name: 'artifact' |         name: 'artifact' | ||||||
|         path: some/other/path |         path: some/other/path | ||||||
|  | @ -130,7 +129,7 @@ jobs: | ||||||
| 
 | 
 | ||||||
|     # Download Artifact #3 and verify the correctness of the content |     # Download Artifact #3 and verify the correctness of the content | ||||||
|     - name: 'Download artifact #3' |     - name: 'Download artifact #3' | ||||||
|       uses: actions/download-artifact@v1 |       uses: actions/download-artifact@v3 | ||||||
|       with: |       with: | ||||||
|         name: 'GZip-Artifact' |         name: 'GZip-Artifact' | ||||||
|         path: gzip/artifact/path |         path: gzip/artifact/path | ||||||
|  | @ -150,7 +149,7 @@ jobs: | ||||||
|       shell: pwsh |       shell: pwsh | ||||||
| 
 | 
 | ||||||
|     - name: 'Download artifact #4' |     - name: 'Download artifact #4' | ||||||
|       uses: actions/download-artifact@v1 |       uses: actions/download-artifact@v3 | ||||||
|       with: |       with: | ||||||
|         name: 'Multi-Path-Artifact' |         name: 'Multi-Path-Artifact' | ||||||
|         path: multi/artifact |         path: multi/artifact | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								.licenses/npm/@actions/artifact.dep.yml
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@actions/artifact.dep.yml
									
										
									
										generated
									
									
									
								
							|  | @ -1,6 +1,6 @@ | ||||||
| --- | --- | ||||||
| name: "@actions/artifact" | name: "@actions/artifact" | ||||||
| version: 1.0.0 | version: 1.1.1 | ||||||
| type: npm | type: npm | ||||||
| summary:  | summary:  | ||||||
| homepage:  | homepage:  | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								.licenses/npm/@actions/core.dep.yml
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@actions/core.dep.yml
									
										
									
										generated
									
									
									
								
							|  | @ -1,6 +1,6 @@ | ||||||
| --- | --- | ||||||
| name: "@actions/core" | name: "@actions/core" | ||||||
| version: 1.2.6 | version: 1.10.0 | ||||||
| type: npm | type: npm | ||||||
| summary: Actions core lib | summary: Actions core lib | ||||||
| homepage: https://github.com/actions/toolkit/tree/main/packages/core | homepage: https://github.com/actions/toolkit/tree/main/packages/core | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								.licenses/npm/@actions/glob.dep.yml
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@actions/glob.dep.yml
									
										
									
										generated
									
									
									
								
							|  | @ -1,6 +1,6 @@ | ||||||
| --- | --- | ||||||
| name: "@actions/glob" | name: "@actions/glob" | ||||||
| version: 0.1.0 | version: 0.3.0 | ||||||
| type: npm | type: npm | ||||||
| summary: Actions glob lib | summary: Actions glob lib | ||||||
| homepage: https://github.com/actions/toolkit/tree/master/packages/glob | homepage: https://github.com/actions/toolkit/tree/master/packages/glob | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								.licenses/npm/@actions/io.dep.yml
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.licenses/npm/@actions/io.dep.yml
									
										
									
										generated
									
									
									
								
							|  | @ -1,6 +1,6 @@ | ||||||
| --- | --- | ||||||
| name: "@actions/io" | name: "@actions/io" | ||||||
| version: 1.0.2 | version: 1.1.2 | ||||||
| type: npm | type: npm | ||||||
| summary: Actions io lib | summary: Actions io lib | ||||||
| homepage: https://github.com/actions/toolkit/tree/master/packages/io | homepage: https://github.com/actions/toolkit/tree/master/packages/io | ||||||
|  |  | ||||||
|  | @ -28,7 +28,7 @@ See [action.yml](action.yml) | ||||||
| 
 | 
 | ||||||
| ```yaml | ```yaml | ||||||
| steps: | steps: | ||||||
| - uses: actions/checkout@v2 | - uses: actions/checkout@v3 | ||||||
| 
 | 
 | ||||||
| - run: mkdir -p path/to/artifact | - run: mkdir -p path/to/artifact | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										17514
									
								
								dist/index.js
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										17514
									
								
								dist/index.js
									
										
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										22493
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										22493
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										36
									
								
								package.json
									
										
									
									
									
								
							
							
						
						
									
										36
									
								
								package.json
									
										
									
									
									
								
							|  | @ -29,25 +29,25 @@ | ||||||
|   }, |   }, | ||||||
|   "homepage": "https://github.com/actions/upload-artifact#readme", |   "homepage": "https://github.com/actions/upload-artifact#readme", | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@actions/artifact": "^1.0.0", |     "@actions/artifact": "^1.1.1", | ||||||
|     "@actions/core": "^1.2.6", |     "@actions/core": "^1.10.0", | ||||||
|     "@actions/glob": "^0.1.0", |     "@actions/glob": "^0.3.0", | ||||||
|     "@actions/io": "^1.0.2" |     "@actions/io": "^1.1.2" | ||||||
|   }, |   }, | ||||||
|   "devDependencies": { |   "devDependencies": { | ||||||
|     "@types/jest": "^25.2.1", |     "@types/jest": "^29.2.5", | ||||||
|     "@types/node": "^13.11.1", |     "@types/node": "^18.11.18", | ||||||
|     "@typescript-eslint/parser": "^2.27.0", |     "@typescript-eslint/parser": "^5.48.0", | ||||||
|     "@zeit/ncc": "^0.22.1", |     "@vercel/ncc": "^0.36.0", | ||||||
|     "concurrently": "^5.1.0", |     "concurrently": "^7.6.0", | ||||||
|     "eslint": "^7.4.0", |     "eslint": "^8.31.0", | ||||||
|     "eslint-plugin-github": "^4.1.1", |     "eslint-plugin-github": "^4.6.0", | ||||||
|     "eslint-plugin-jest": "^23.8.2", |     "eslint-plugin-jest": "^27.2.0", | ||||||
|     "glob": "^7.1.6", |     "glob": "^8.0.3", | ||||||
|     "jest": "^27.2.5", |     "jest": "^29.3.1", | ||||||
|     "jest-circus": "^27.2.5", |     "jest-circus": "^29.3.1", | ||||||
|     "prettier": "^2.0.4", |     "prettier": "^2.8.1", | ||||||
|     "ts-jest": "^27.0.6", |     "ts-jest": "^29.0.3", | ||||||
|     "typescript": "^3.8.3" |     "typescript": "^4.9.4" | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,3 +1,4 @@ | ||||||
|  | /* eslint-disable no-unused-vars */ | ||||||
| export enum Inputs { | export enum Inputs { | ||||||
|   Name = 'name', |   Name = 'name', | ||||||
|   Path = 'path', |   Path = 'path', | ||||||
|  |  | ||||||
|  | @ -68,8 +68,8 @@ async function run(): Promise<void> { | ||||||
|         ) |         ) | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } catch (err) { |   } catch (error) { | ||||||
|     core.setFailed(err.message) |     core.setFailed((error as Error).message) | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue