Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update upload-artifact and download-artifact actions to v4 #9447

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/bench-turborepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ jobs:
run: pnpm -F @turbo/benchmark ttft "${{ steps.filename.outputs.filename }}"

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: profiles # This name will be the folder each file gets downloaded to
name: profiles-${{ matrix.os.name }} # This name will be the folder each file gets downloaded to
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v4 of actions/upload-artifact does not allow uploading to the same artifact name anymore and we need to give each artifact a unique name. See:

  1. https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md#multiple-uploads-to-the-same-named-artifact
  2. https://github.com/actions/upload-artifact?tab=readme-ov-file#not-uploading-to-the-same-artifact

This is the only workflow where we didn't give the artifact a unique name in matrix scenarios.

if-no-files-found: error
# cwd is root of the repository, so we need the benchmark/ prefixed path
path: |
Expand All @@ -112,10 +112,11 @@ jobs:
uses: ./.github/actions/setup-node

- name: Download profiles
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: profiles
path: packages/turbo-benchmark/profiles/
pattern: profiles-*
merge-multiple: true
Comment on lines -117 to +119
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


- name: Display TTFT Data
shell: bash
Expand Down Expand Up @@ -146,10 +147,11 @@ jobs:
uses: ./.github/actions/setup-node

- name: Download profiles
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: profiles
path: packages/turbo-benchmark/profiles/
pattern: profiles-*
merge-multiple: true

- name: Display TTFT Data
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
run: ${{ matrix.settings.rust-build-env }} cargo build --profile release-turborepo-lsp -p turborepo-lsp --target ${{ matrix.settings.target }}

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: turborepo-lsp-${{ matrix.settings.target }}
path: target/${{ matrix.settings.target }}/release-turborepo-lsp/turborepo-lsp*
4 changes: 2 additions & 2 deletions .github/workflows/turborepo-compare-cache-item.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
turbo run build --filter=docs --filter=web --summarize --skip-infer -vvv
- name: Grab Turborepo artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cache-item-${{ matrix.os }}-${{ inputs.version }}
path: |
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
pnpm dlx create-turbo@${{ inputs.version }} my-turborepo pnpm
- name: Download cache artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: cache-item-${{ matrix.cache_os }}-${{ inputs.version }}
path: my-turborepo
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/turborepo-library-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
${{ matrix.settings.rust_env }} pnpm build:release --target=${{ matrix.settings.target }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: turbo-library-${{ matrix.settings.target }}
path: packages/turbo-repository/native
Expand All @@ -138,7 +138,7 @@ jobs:
git config --global user.email 'turbobot@vercel.com'
- name: Download Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: native-packages

Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
mv *.tgz tarballs/
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Upload Tarballs
path: tarballs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/turborepo-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
run: ${{ matrix.settings.rust-build-env }} cargo build --profile release-turborepo -p turbo --target ${{ matrix.settings.target }}

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: turbo-${{ matrix.settings.target }}
path: target/${{ matrix.settings.target }}/release-turborepo/turbo*
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

- name: Download Rust artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: rust-artifacts

Expand All @@ -239,7 +239,7 @@ jobs:

# Upload published artifacts in case they are needed for debugging later
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: turbo-combined
path: cli/dist
Expand Down
Loading