Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: actions/upload-artifact
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3-node20
Choose a base ref
...
head repository: actions/upload-artifact
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.3.4
Choose a head ref

Commits on Aug 24, 2023

  1. 1
    Copy the full SHA
    99700c1 View commit details
  2. 1
    Copy the full SHA
    0f57369 View commit details
  3. update dist

    bethanyj28 committed Aug 24, 2023
    1
    Copy the full SHA
    0597a56 View commit details
  4. Merge pull request #430 from bethanyj28/main

    Create v4-beta
    bethanyj28 authored Aug 24, 2023
    Copy the full SHA
    0ff37d0 View commit details

Commits on Oct 16, 2023

  1. Copy the full SHA
    50ad273 View commit details
  2. Merge pull request #446 from robherley/v4-beta

    [v4-beta] Bump linked artifact toolkit pkg
    robherley authored Oct 16, 2023
    Copy the full SHA
    f87a408 View commit details

Commits on Oct 26, 2023

  1. Add artifact-id output to v4-beta (#448)

    * Add artifact-id to outputs
    
    * ncc
    
    ---------
    
    Co-authored-by: Rob Herley <robherley@github.com>
    konradpabjan and robherley authored Oct 26, 2023
    Copy the full SHA
    aa5cae1 View commit details

Commits on Nov 20, 2023

  1. add compression level input

    robherley committed Nov 20, 2023
    Copy the full SHA
    20bcd3b View commit details
  2. bump for more logs

    robherley committed Nov 20, 2023
    Copy the full SHA
    59ef34a View commit details

Commits on Nov 21, 2023

  1. Copy the full SHA
    fa39c94 View commit details
  2. Merge pull request #453 from actions/robherley/more-v4-improvements

    More v4 Improvements: adjustable compression level and tweak concurrency
    robherley authored Nov 21, 2023
    Copy the full SHA
    eeb333d View commit details

Commits on Dec 4, 2023

  1. Copy the full SHA
    83b889d View commit details
  2. Merge pull request #460 from actions/robherley/consume-latest-toolkit

    Consume latest @actions/artifact
    robherley authored Dec 4, 2023
    Copy the full SHA
    500e175 View commit details

Commits on Dec 7, 2023

  1. Copy the full SHA
    eba2a24 View commit details

Commits on Dec 11, 2023

  1. Copy the full SHA
    9a179cd View commit details
  2. Merge pull request #464 from actions/vmjoseph/v4-beta-more-descriptiv…

    …e-annotations
    
    Consume latest @actions/toolkit
    vmjoseph authored Dec 11, 2023
    Copy the full SHA
    2a6c27a View commit details

Commits on Dec 13, 2023

  1. Copy the full SHA
    6a5077f View commit details
  2. s/v4-beta/v4/g

    robherley committed Dec 13, 2023
    Copy the full SHA
    1b56155 View commit details
  3. naming

    robherley committed Dec 13, 2023
    Copy the full SHA
    d6437d0 View commit details
  4. trim some repeated info

    robherley committed Dec 13, 2023
    Copy the full SHA
    5e7604f View commit details
  5. add compression example

    robherley committed Dec 13, 2023
    Copy the full SHA
    ecb2146 View commit details
  6. add limitations section

    robherley committed Dec 13, 2023
    Copy the full SHA
    875b630 View commit details
  7. Apply suggestions from code review

    Co-authored-by: Konrad Pabjan <konradpabjan@github.com>
    robherley and konradpabjan authored Dec 13, 2023
    Copy the full SHA
    9653d03 View commit details
  8. Merge pull request #465 from actions/robherley/v4-documentation

    Update documentation for v4
    robherley authored Dec 13, 2023
    Copy the full SHA
    f391bb9 View commit details
  9. Copy the full SHA
    4a6c273 View commit details
  10. licensed cache

    robherley committed Dec 13, 2023
    Copy the full SHA
    13131bb View commit details

Commits on Dec 14, 2023

  1. Merge pull request #466 from actions/v4-beta

    upload-artifact@v4
    robherley authored Dec 14, 2023
    Copy the full SHA
    c7d193f View commit details
  2. Copy the full SHA
    6c139af View commit details
  3. 1
    Copy the full SHA
    3530730 View commit details

Commits on Dec 18, 2023

  1. add migrations docs

    robherley committed Dec 18, 2023
    Copy the full SHA
    7f16e37 View commit details
  2. Merge pull request #482 from actions/robherley/add-migration-docs

    Add migrations docs
    robherley authored Dec 18, 2023
    Copy the full SHA
    cf8714c View commit details

Commits on Jan 10, 2024

  1. Update README.md (#492)

    Use correct id of step
    samuelwine authored Jan 10, 2024
    Copy the full SHA
    c320f57 View commit details
  2. Support artifact-url output (#496)

    * Support artifact-url output
    
    * update dist/index.js
    
    * Update license
    
    * Simplify output
    
    * Update README
    konradpabjan authored Jan 10, 2024
    Copy the full SHA
    73d8b66 View commit details
  3. Copy the full SHA
    8688a86 View commit details
  4. Merge pull request #497 from actions/robherley/update-readme-limit

    Update readme to reflect new artifact per job limit
    robherley authored Jan 10, 2024
    Copy the full SHA
    1eb3cb2 View commit details

Commits on Jan 18, 2024

  1. Copy the full SHA
    11ff42c View commit details
  2. licensed cache

    robherley committed Jan 18, 2024
    Copy the full SHA
    7961590 View commit details
  3. Copy the full SHA
    49552fc View commit details
  4. update readme

    robherley committed Jan 18, 2024
    1
    Copy the full SHA
    40b3052 View commit details
  5. Copy the full SHA
    05d4fe6 View commit details
  6. Merge pull request #501 from actions/robherley/overwrite-artifact

    Ability to overwrite an Artifact
    robherley authored Jan 18, 2024
    Copy the full SHA
    694cdab View commit details

Commits on Jan 22, 2024

  1. Copy the full SHA
    8d531b1 View commit details
  2. fix import

    robherley committed Jan 22, 2024
    Copy the full SHA
    1f64adb View commit details
  3. ncc

    robherley committed Jan 22, 2024
    Copy the full SHA
    da58a3f View commit details
  4. Merge pull request #504 from actions/robherley/reorganize

    Reorganize upload code in prep for merge logic & add more tests
    robherley authored Jan 22, 2024
    Copy the full SHA
    52899c8 View commit details

Commits on Jan 23, 2024

  1. 1
    Copy the full SHA
    997fffa View commit details
  2. ncc

    robherley committed Jan 23, 2024
    Copy the full SHA
    3f353f9 View commit details
  3. more docs

    robherley committed Jan 23, 2024
    1
    Copy the full SHA
    199a58f View commit details
  4. Copy the full SHA
    90b0f8e View commit details
  5. Copy the full SHA
    53ef698 View commit details
Showing with 277,676 additions and 12,492 deletions.
  1. +20 −19 .github/workflows/check-dist.yml
  2. +1 −1 .github/workflows/licensed.yml
  3. +1 −1 .github/workflows/release-new-action-version.yml
  4. +126 −44 .github/workflows/test.yml
  5. +3 −3 .licenses/npm/@actions/artifact.dep.yml
  6. +3 −3 .licenses/npm/@actions/core.dep.yml
  7. +5 −5 .licenses/npm/{uuid.dep.yml → @actions/github.dep.yml}
  8. +10 −20 .licenses/npm/@actions/glob.dep.yml
  9. +0 −32 .licenses/npm/@actions/http-client.dep.yml
  10. +10 −20 .licenses/npm/@actions/io.dep.yml
  11. +0 −55 .licenses/npm/balanced-match.dep.yml
  12. +0 −55 .licenses/npm/brace-expansion.dep.yml
  13. +0 −31 .licenses/npm/concat-map.dep.yml
  14. +0 −55 .licenses/npm/fs.realpath.dep.yml
  15. +0 −32 .licenses/npm/glob.dep.yml
  16. +0 −26 .licenses/npm/inflight.dep.yml
  17. +0 −27 .licenses/npm/inherits.dep.yml
  18. +3 −3 .licenses/npm/minimatch.dep.yml
  19. +0 −26 .licenses/npm/once.dep.yml
  20. +0 −34 .licenses/npm/path-is-absolute.dep.yml
  21. +0 −26 .licenses/npm/rimraf.dep.yml
  22. +0 −30 .licenses/npm/tmp-promise.dep.yml
  23. +0 −32 .licenses/npm/tmp.dep.yml
  24. +0 −35 .licenses/npm/tunnel.dep.yml
  25. +0 −26 .licenses/npm/wrappy.dep.yml
  26. +264 −107 README.md
  27. +175 −0 __tests__/merge.test.ts
  28. +1 −1 __tests__/search.test.ts
  29. +231 −0 __tests__/upload.test.ts
  30. +36 −3 action.yml
  31. +0 −11,262 dist/index.js
  32. +136,233 −0 dist/merge/index.js
  33. +136,243 −0 dist/upload/index.js
  34. +209 −0 docs/MIGRATION.md
  35. +200 −0 merge/README.md
  36. +57 −0 merge/action.yml
  37. +3,512 −393 package-lock.json
  38. +9 −7 package.json
  39. +9 −0 src/merge/constants.ts
  40. +6 −0 src/merge/index.ts
  41. +44 −0 src/merge/input-helper.ts
  42. +93 −0 src/merge/merge-artifacts.ts
  43. +33 −0 src/merge/merge-inputs.ts
  44. 0 src/{ → shared}/search.ts
  45. +28 −0 src/shared/upload-artifact.ts
  46. +0 −76 src/upload-artifact.ts
  47. +3 −1 src/{ → upload}/constants.ts
  48. +6 −0 src/upload/index.ts
  49. +15 −1 src/{ → upload}/input-helper.ts
  50. +77 −0 src/upload/upload-artifact.ts
  51. +10 −0 src/{ → upload}/upload-inputs.ts
39 changes: 20 additions & 19 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -10,43 +10,44 @@ on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
branches:
- main
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:
check-dist:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Node 16
uses: actions/setup-node@v3
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Move the committed index.js file
run: mv dist/index.js /tmp

- name: Rebuild with tsc
run: npm run build

- name: Rebuild the index.js file
- name: Rebuild the dist/ directory
run: npm run release

- name: Compare the expected and actual index.js files
run: git diff --ignore-all-space dist/index.js /tmp/index.js
- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff

# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: index.js
path: dist/index.js
name: dist
path: dist/
2 changes: 1 addition & 1 deletion .github/workflows/licensed.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
name: Check licenses
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: npm ci
- name: Install licensed
run: |
2 changes: 1 addition & 1 deletion .github/workflows/release-new-action-version.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ jobs:
steps:
- name: Update the ${{ env.TAG_NAME }} tag
id: update-major-tag
uses: actions/publish-action@v0.2.1
uses: actions/publish-action@v0.3.0
with:
source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
170 changes: 126 additions & 44 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Test

on:
push:
branches:
@@ -10,7 +11,6 @@ on:
- '**.md'

jobs:

build:
name: Build

@@ -23,12 +23,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node 16
uses: actions/setup-node@v3
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20.x
cache: 'npm'

- name: Install dependencies
@@ -54,43 +54,36 @@ jobs:
mkdir -p path/to/dir-3
echo "Lorem ipsum dolor sit amet" > path/to/dir-1/file1.txt
echo "Hello world from file #2" > path/to/dir-2/file2.txt
echo "This is a going to be a test for a large enough file that should get compressed with GZip. The @actions/artifact package uses GZip to upload files. This text should have a compression ratio greater than 100% so it should get uploaded using GZip" > path/to/dir-3/gzip.txt
# Upload a single file artifact
- name: 'Upload artifact #1'
uses: ./
with:
name: 'Artifact-A'
name: 'Artifact-A-${{ matrix.runs-on }}'
path: path/to/dir-1/file1.txt

# Upload using a wildcard pattern, name should default to 'artifact' if not provided
# Upload using a wildcard pattern
- name: 'Upload artifact #2'
uses: ./
with:
name: 'Artifact-Wildcard-${{ matrix.runs-on }}'
path: path/**/dir*/

# Upload a directory that contains a file that will be uploaded with GZip
# Upload a multi-path artifact
- name: 'Upload artifact #3'
uses: ./
with:
name: 'GZip-Artifact'
path: path/to/dir-3/

# Upload a directory that contains a file that will be uploaded with GZip
- name: 'Upload artifact #4'
uses: ./
with:
name: 'Multi-Path-Artifact'
name: 'Multi-Path-Artifact-${{ matrix.runs-on }}'
path: |
path/to/dir-1/*
path/to/dir-[23]/*
!path/to/dir-3/*.txt
# Download Artifact #1 and verify the correctness of the content
- name: 'Download artifact #1'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'Artifact-A'
name: 'Artifact-A-${{ matrix.runs-on }}'
path: some/new/path

- name: 'Verify Artifact #1'
@@ -108,9 +101,9 @@ jobs:

# Download Artifact #2 and verify the correctness of the content
- name: 'Download artifact #2'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'artifact'
name: 'Artifact-Wildcard-${{ matrix.runs-on }}'
path: some/other/path

- name: 'Verify Artifact #2'
@@ -127,31 +120,11 @@ jobs:
}
shell: pwsh

# Download Artifact #3 and verify the correctness of the content
- name: 'Download artifact #3'
uses: actions/download-artifact@v3
with:
name: 'GZip-Artifact'
path: gzip/artifact/path

# Because a directory was used as input during the upload the parent directories, path/to/dir-3/, should not be included in the uploaded artifact
- name: 'Verify Artifact #3'
run: |
$gzipFile = "gzip/artifact/path/gzip.txt"
if(!(Test-Path -path $gzipFile))
{
Write-Error "Expected file do not exist"
}
if(!((Get-Content $gzipFile) -ceq "This is a going to be a test for a large enough file that should get compressed with GZip. The @actions/artifact package uses GZip to upload files. This text should have a compression ratio greater than 100% so it should get uploaded using GZip"))
{
Write-Error "File contents of downloaded artifact is incorrect"
}
shell: pwsh

# Download Artifact #4 and verify the correctness of the content
- name: 'Download artifact #4'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'Multi-Path-Artifact'
name: 'Multi-Path-Artifact-${{ matrix.runs-on }}'
path: multi/artifact

- name: 'Verify Artifact #4'
@@ -167,3 +140,112 @@ jobs:
Write-Error "File contents of downloaded artifacts are incorrect"
}
shell: pwsh

- name: 'Alter file 1 content'
run: |
echo "This file has changed" > path/to/dir-1/file1.txt
# Replace the contents of Artifact #1
- name: 'Overwrite artifact #1'
uses: ./
with:
name: 'Artifact-A-${{ matrix.runs-on }}'
path: path/to/dir-1/file1.txt
overwrite: true

# Download replaced Artifact #1 and verify the correctness of the content
- name: 'Download artifact #1 again'
uses: actions/download-artifact@v4
with:
name: 'Artifact-A-${{ matrix.runs-on }}'
path: overwrite/some/new/path

- name: 'Verify Artifact #1 again'
run: |
$file = "overwrite/some/new/path/file1.txt"
if(!(Test-Path -path $file))
{
Write-Error "Expected file does not exist"
}
if(!((Get-Content $file) -ceq "This file has changed"))
{
Write-Error "File contents of downloaded artifact are incorrect"
}
shell: pwsh
merge:
name: Merge
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

# Merge all artifacts from previous jobs
- name: Merge all artifacts in run
uses: ./merge/
with:
# our matrix produces artifacts with the same file, this prevents "stomping" on each other, also makes it
# easier to identify each of the merged artifacts
separate-directories: true
- name: 'Download merged artifacts'
uses: actions/download-artifact@v4
with:
name: merged-artifacts
path: all-merged-artifacts
- name: 'Check merged artifact has directories for each artifact'
run: |
$artifacts = @(
"Artifact-A-ubuntu-latest",
"Artifact-A-macos-latest",
"Artifact-A-windows-latest",
"Artifact-Wildcard-ubuntu-latest",
"Artifact-Wildcard-macos-latest",
"Artifact-Wildcard-windows-latest",
"Multi-Path-Artifact-ubuntu-latest",
"Multi-Path-Artifact-macos-latest",
"Multi-Path-Artifact-windows-latest"
)
foreach ($artifact in $artifacts) {
$path = "all-merged-artifacts/$artifact"
if (!(Test-Path $path)) {
Write-Error "$path does not exist."
}
}
shell: pwsh

# Merge Artifact-A-* from previous jobs
- name: Merge all Artifact-A
uses: ./merge/
with:
name: Merged-Artifact-As
pattern: 'Artifact-A-*'
separate-directories: true

# Download merged artifacts and verify the correctness of the content
- name: 'Download merged artifacts'
uses: actions/download-artifact@v4
with:
name: Merged-Artifact-As
path: merged-artifact-a

- name: 'Verify merged artifacts'
run: |
$files = @(
"merged-artifact-a/Artifact-A-ubuntu-latest/file1.txt",
"merged-artifact-a/Artifact-A-macos-latest/file1.txt",
"merged-artifact-a/Artifact-A-windows-latest/file1.txt"
)
foreach ($file in $files) {
if (!(Test-Path $file)) {
Write-Error "$file does not exist."
}
if (!((Get-Content $file) -ceq "This file has changed")) {
Write-Error "$file has incorrect content."
}
}
shell: pwsh

6 changes: 3 additions & 3 deletions .licenses/npm/@actions/artifact.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .licenses/npm/@actions/core.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading