Skip to content

Commit

Permalink
Updated publish.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanKev117 committed Jul 25, 2024
1 parent 624bafa commit cf21767
Showing 1 changed file with 22 additions and 24 deletions.
46 changes: 22 additions & 24 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
name: Publish Python Package
name: Upload Python Package to PyPI when a Release is Created

on:
release:
types: [published]

jobs:
publish:
pypi-publish:
name: Publish release to PyPI
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/dnaStreaming
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'

- name: Install dependencies
run: pip install -r requirements.txt

- name: Build package
run: python setup.py sdist bdist_wheel

- name: Publish package to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
pip install twine
twine upload dist/*
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
- name: Build package
run: |
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit cf21767

Please sign in to comment.