Skip to content

Commit

Permalink
Migrate actions/{upload,download}-artifact to v4 artifact naming
Browse files Browse the repository at this point in the history
  • Loading branch information
brianschubert committed Mar 13, 2024
1 parent d5b0350 commit a0406f7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ jobs:
- name: Retrieve 6S source archives
uses: actions/download-artifact@v4
with:
name: 6s-archives
pattern: 6s-archives-*
path: 6s-archives
merge-multiple: true

# Only build source distribution in a single job.
# In the job that builds the source distribution, call 'build' with no arguments so that it builds the wheel
Expand All @@ -63,13 +64,13 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: dist-build
name: dist-build-${{ matrix.os }}
path: dist
if-no-files-found: error

- uses: actions/upload-artifact@v4
with:
name: buildpy-logs
name: buildpy-logs-${{ matrix.os }}
path: ${{ matrix.os }}-buildpy.log
if-no-files-found: error

Expand All @@ -79,8 +80,9 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: dist-build
pattern: dist-build-*
path: dist
merge-multiple: true

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -95,7 +97,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: dist-release
name: dist-release-${{ matrix.os }}
path: dist
if-no-files-found: error

Expand All @@ -116,8 +118,9 @@ jobs:

- uses: actions/download-artifact@v4
with:
name: dist-release
pattern: dist-release-*
path: dist
merge-multiple: true

# Makes sure that the installed distribution is from the wheels that were just built and not downloaded from PyPI.
# --no-index - only search './dist' (not PyPI)
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ jobs:
- name: Retrieve distributions
uses: actions/download-artifact@v4
with:
name: dist-release
pattern: dist-release-*
path: dist
merge-multiple: true

# Verify that the version tag on all distribution files matches the pushed tag.
- name: Check version consistency
Expand Down Expand Up @@ -137,8 +138,9 @@ jobs:
- name: Retrieve distributions
uses: actions/download-artifact@v4
with:
name: dist-release
pattern: dist-release-*
path: dist
merge-multiple: true

- name: Publish distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ jobs:
- name: Retrieve 6S source archives
uses: actions/download-artifact@v4
with:
name: 6s-archives
pattern: 6s-archives-*
path: 6s-archives
merge-multiple: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/web_artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ jobs:
curl --create-dirs --output-dir artifacts -O ${{ matrix.url }}
- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
name: ${{ inputs.name }}-${{ matrix.url }}
path: artifacts
retention-days: ${{ inputs.retention-days }}

0 comments on commit a0406f7

Please sign in to comment.