Skip to content

Commit

Permalink
build(dist): each build artifact gets a unique key and merged separately
Browse files Browse the repository at this point in the history
Uploads are now immutable for actions/upload-artifact@v4.

This gives each build artifact a unique key, and then merges them together at the end.
The [migration guide] suggests this pattern.

[migration guide]: https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md#merging-multiple-artifacts
  • Loading branch information
Michael-J-Ward committed Aug 22, 2024
1 parent 68f5aaa commit 0894489
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
- name: Archive wheels
uses: actions/upload-artifact@v4
with:
name: dist
name: dist-mac-win
path: target/wheels/*

build-macos-aarch64:
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
- name: Archive wheels
uses: actions/upload-artifact@v4
with:
name: dist
name: dist-macos-aarch64
path: target/wheels/*

build-manylinux:
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
- name: Archive wheels
uses: actions/upload-artifact@v4
with:
name: dist
name: dist-manylinux
path: target/wheels/*

build-manylinux-aarch64:
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
- name: Archive wheels
uses: actions/upload-artifact@v4
with:
name: dist
name: dist-manylinux-aarch64
path: target/wheels/*

build-sdist:
Expand All @@ -249,9 +249,24 @@ jobs:
- name: Archive wheels
uses: actions/upload-artifact@v4
with:
name: dist
name: dist-sdist
path: target/wheels/*


merge-build-artifacts:
runs-on: ubuntu-latest
needs:
- build-python-mac-win
- build-macos-aarch64
- build-manylinux
- build-manylinux-aarch64
- build-sdist
steps:
- name: Merge Build Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: dist
pattern: dist-*

# NOTE: PyPI publish needs to be done manually for now after release passed the vote
# release:
# name: Publish in PyPI
Expand Down

0 comments on commit 0894489

Please sign in to comment.