Skip to content

Commit

Permalink
Don't overwrite artifact on each job (#157)
Browse files Browse the repository at this point in the history
* Revert back to upload-artifact@v3 since v4 doesn't append artifacts, only
   possible to overwrite. 
* Add artifact uploading to gh release
  • Loading branch information
milesgranger authored Apr 28, 2024
1 parent 5d9730d commit 0f61d6a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/CI-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
- released
- prereleased

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
Expand Down Expand Up @@ -320,12 +323,11 @@ jobs:
venv/bin/python -c 'import cramjam' || venv/bin/cramjam-cli --help
- name: Upload wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
if: ${{ ( startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/tags/') ) }}
with:
name: dist
path: dist
overwrite: true

build-sdist:
name: Build sdists
Expand All @@ -342,7 +344,7 @@ jobs:
- name: Build sdist cramjam-cli
run: python -m build --sdist cramjam-cli/ -o ./dist
- name: Upload sdists
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
Expand Down Expand Up @@ -386,3 +388,10 @@ jobs:
with:
skip-existing: true
packages-dir: artifacts-${{ matrix.package }}/

- name: Upload to GitHub
uses: softprops/action-gh-release@v2
with:
files: artifacts-${{ matrix.package }}/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0f61d6a

Please sign in to comment.