Skip to content

Commit

Permalink
release asset
Browse files Browse the repository at this point in the history
  • Loading branch information
daimor committed Mar 19, 2022
1 parent 0c9e26a commit 77bf5b5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
python -m pip install --upgrade pip
pip install build
echo ::set-output name=version::$VERSION
NAME=$(grep name setup.cfg | cut -d= -f2 | tr -d '[:blank:]')-${VERSION}-py3-none-any
echo ::set-output name=name::$NAME
- name: Build package
run: python -m build
- name: Publish package
Expand All @@ -51,9 +53,19 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.set-version.outputs.version }}
release_name: v${{ steps.set-version.outputs.version }}
tag_name: ${{ steps.set-version.outputs.version }}
release_name: ${{ steps.set-version.outputs.version }}
prerelease: ${{ github.event_name != 'release' }}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event_name == 'release' && github.event.release.upload_url || steps.create_release.outputs.upload_url }}
asset_path: dist/${{ steps.set-version.outputs.name }}.whl
asset_name: ${{ steps.set-version.outputs.name }}.whl
asset_content_type: application/zip
- name: Bump version
if: github.event_name == 'release'
run: |
Expand Down

0 comments on commit 77bf5b5

Please sign in to comment.