Skip to content

Commit

Permalink
Try getting artifact upload/download to work
Browse files Browse the repository at this point in the history
Tox isn't recognizing the wheel file in the dist directory after
downloading the artifact. From the examples it looks like the download
action should drop the artifact into the working directory, but since
the artifact *is* a directory it may not be working the way I think it
should.

I'm trying to see if tarring/untarring the dist directory will help.
  • Loading branch information
jthomale committed Nov 18, 2022
1 parent d80e342 commit f6f92aa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ jobs:
python -m pip install tox
- name: Build the package
run: tox -e build_package
- name: Upload built package
- name: Tar the dist directory
run: tar -cvf dist.tar dist
- name: Upload dist.tar
uses: actions/upload-artifact@v3
with:
name: pycallnumber-dist
path: dist
path: dist.tar
retention-days: 1

test-built-package:
Expand Down Expand Up @@ -88,10 +90,14 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Download built package
- name: Download dist.tar
uses: actions/download-artifact@v3
with:
name: pycallnumber-dist
- name: Un-tar built package
run: |
tar -xvf dist.tar
ls -Rl
- name: Install built package and run tests
run: tox -e "py${{ matrix.tox-env }}-test_built_package"

Expand All @@ -103,6 +109,10 @@ jobs:
uses: actions/download-artifact@v3
with:
name: pycallnumber-dist
- name: Un-tar built package
run: |
tar -xvf dist.tar
ls -Rl
- name: Publish package to Test PyPI
if: ${{ !inputs.skipTestUpload }}
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.pyc
dist/
dist.tar
build/
*.egg-info
*.egg
Expand Down

0 comments on commit f6f92aa

Please sign in to comment.