Skip to content

Commit

Permalink
Update python-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gpagliuca authored Mar 25, 2023
1 parent e064d61 commit 4b5899a
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,30 @@
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package
name: Build and publish Python 🐍 distributions πŸ“¦ to PyPI and TestPyPI

on:
release:
types: [published]
on: push

jobs:
deploy:

build-n-publish:
name: Build and publish Python 🐍 distributions πŸ“¦ to PyPI and TestPyPI
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- uses: actions/checkout@master
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.X"


- name: Publish distribution πŸ“¦ to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- name: Publish distribution πŸ“¦ to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 4b5899a

Please sign in to comment.