Skip to content

bump twine & pkginfo before pypi upload #5

bump twine & pkginfo before pypi upload

bump twine & pkginfo before pypi upload #5

Workflow file for this run

name: Publish Python Package
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: false
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
publish_pypi:
name: Publish to PyPi
runs-on: ubuntu-24.04
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
contents: write
environment:
name: pypi
url: https://pypi.org/p/biperscan
steps:
- name: Extract version
id: version
run: |
TAG=${{ github.ref }}
VERSION=${TAG#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=v$VERSION" >> $GITHUB_OUTPUT
- name: Download wheels and sdist
uses: dawidd6/action-download-artifact@v8
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: Wheels.yml
workflow_conclusion: success
branch: main
path: .
- name: Move files to dist
run: |
mkdir dist
mv sdist/* dist/
mv wheel*/* dist/
if [[ ! -f dist/biperscan-${{ steps.version.outputs.version }}.tar.gz ]] ; then exit 1; fi
- uses: actions/setup-python@v4
name: Install python
with:
python-version: "3.10"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade twine pkginfo
- name: Publish package to (Test)PyPI
uses: pypa/[email protected]
# Comment lines below to publish to PyPi instead of test PyPi
# with:
# repository-url: https://test.pypi.org/legacy/
- name: Create Github Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create -R vda-lab/biperscan -t "Version ${{ steps.version.outputs.version }}" -n "**Full Changelog**: https://github.com/vda-lab/biperscan/commits/${{ steps.version.outputs.tag }}" "${{ steps.version.outputs.tag }}" dist/*.whl dist/*.tar.gz