Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
Add new workflow stub from the official GH Actions
  • Loading branch information
baseely authored Jan 2, 2024
1 parent ce1be7c commit cc699d9
Showing 1 changed file with 25 additions and 43 deletions.
68 changes: 25 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,31 @@
name: Publish to PyPI
on:
push:
tags:
- '*'

jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
=name: Upload Python Package to PyPI

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
on:
release:
types: [published]

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
pip install --upgrade twine
permissions:
contents: read

- name: Build and publish wheel
run: |
python -m build
twine upload dist/*.whl
jobs:
deploy:

build:
name: Build distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel
pip install --upgrade twine
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
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
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit cc699d9

Please sign in to comment.