Skip to content

Commit 1fa2822

Browse files
Upgrade version of upload and download artifact
V3 was deprecated in Nov 2024
1 parent 95f78e9 commit 1fa2822

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

.github/actions/install_requirements/action.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ runs:
2929

3030
- name: Create lockfile
3131
run: |
32-
mkdir -p lockfiles
33-
pip freeze --exclude-editable > lockfiles/${{ inputs.requirements_file }}
32+
mkdir -p lockfiles-${{ inputs.python_version }}
33+
pip freeze --exclude-editable > lockfiles-${{ inputs.python_version }}/${{ inputs.requirements_file }}
3434
# delete the self referencing line and make sure it isn't blank
35-
sed -i'' -e '/file:/d' lockfiles/${{ inputs.requirements_file }}
35+
sed -i'' -e '/file:/d' lockfiles-${{ inputs.python_version }}/${{ inputs.requirements_file }}
3636
shell: bash
3737

3838
- name: Upload lockfiles
39-
uses: actions/upload-artifact@v3
39+
uses: actions/upload-artifact@v4
4040
with:
41-
name: lockfiles
41+
name: lockfiles-${{ inputs.python_version }}
4242
path: lockfiles
4343

4444
# This eliminates the class of problems where the requirements being given no
@@ -49,10 +49,9 @@ runs:
4949
- name: If requirements file exists, check it matches pip installed packages
5050
run: |
5151
if [ -s ${{ inputs.requirements_file }} ]; then
52-
if ! diff -u ${{ inputs.requirements_file }} lockfiles/${{ inputs.requirements_file }}; then
52+
if ! diff -u ${{ inputs.requirements_file }} lockfiles-${{ inputs.python_version }}/${{ inputs.requirements_file }}; then
5353
echo "Error: ${{ inputs.requirements_file }} need the above changes to be exhaustive"
5454
exit 1
5555
fi
5656
fi
5757
shell: bash
58-

.github/workflows/code.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ jobs:
8686
CIBW_SKIP: pp* *i686*
8787

8888
- name: Upload sdist and wheels as artifacts
89-
uses: actions/upload-artifact@v3
89+
uses: actions/upload-artifact@v4
9090
with:
91-
name: dist
91+
name: dist-${{ matrix.os }}-${{ matrix.python }}
9292
path: dist
9393

9494
- name: Check for packaging errors
@@ -104,7 +104,11 @@ jobs:
104104
HAS_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN != '' }}
105105

106106
steps:
107-
- uses: actions/download-artifact@v3
107+
- uses: actions/download-artifact@v4
108+
with:
109+
pattern: dist*
110+
path: dist
111+
merge-multiple: true
108112

109113
- name: Fixup blank lockfiles
110114
# Github release artifacts can't be blank

0 commit comments

Comments
 (0)