Skip to content

Commit

Permalink
Use action-gh-release to replace deprecated upload-release-asset (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
tautschnig authored Oct 1, 2024
1 parent d19575d commit da9f9fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/release-brew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,26 +141,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
# this github action is deprecated, but there is no obvious replacement
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
8 changes: 2 additions & 6 deletions .github/workflows/release-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,8 @@ jobs:
run: |
echo "package_name=$(ls dist/*.whl | cut -d / -f 2)" >> $GITHUB_OUTPUT
- name: Upload release binary
# this github action is deprecated, but there is no obvious replacement
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: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit da9f9fd

Please sign in to comment.