Skip to content

Commit

Permalink
Use action-gh-release to replace deprecated upload-release-asset
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig committed Sep 30, 2024
1 parent 89eb737 commit 6c3c130
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/release-brew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,25 +136,16 @@ jobs:
run: |
echo "bottle_name=$(ls *.tar.gz)" >> $GITHUB_OUTPUT
- name: Get File Name
id: get_file_name
run: |
file_name="$(cat *.json | jq -r '."${{ env.TAP }}/${{ env.FORMULA }}".bottle.tags[].filename')"
echo "file_name=$file_name" >> $GITHUB_OUTPUT
- name: Upload bottles as artifact
uses: actions/upload-artifact@v4
with:
name: bottle-${{ matrix.os }}
path: '*.bottle.*'

- name: Upload release binary
uses: actions/upload-release-asset@v1.0.2
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.get_package_path.outputs.bottle_name }}
asset_name: ${{ steps.get_file_name.outputs.file_name }}
asset_content_type: application/x-gzip
files: ${{ steps.get_package_path.outputs.bottle_name }}

update-pr:
needs: build-bottle
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ jobs:
run: |
echo "package_name=$(ls dist/*.whl | cut -d / -f 2)" >> $GITHUB_OUTPUT
- name: Upload release binary
uses: actions/upload-release-asset@v1.0.2
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/${{ steps.get_package_name.outputs.package_name }}
asset_name: ${{ steps.get_package_name.outputs.package_name }}
asset_content_type: application/zip
files: dist/${{ steps.get_package_name.outputs.package_name }}
- name: Upload to PyPi
env:
TWINE_USERNAME: __token__
Expand Down

0 comments on commit 6c3c130

Please sign in to comment.