Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
urigoren authored Nov 30, 2023
1 parent 36e4f22 commit 79f0b53
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@ name: Publish Package
on: [push]

jobs:
build:
name: pypi

deploy:
runs-on: ubuntu-latest

steps:
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.8
- name: Checkout
uses: actions/checkout@v2
- name: Build package
run: |
python3 -m pip install --user --upgrade setuptools twine wheel
python3 setup.py sdist
- name: pypirc
env:
PYPI_USERNAME: ${{ secrets.pypi_username }}
PYPI_PASSWORD: ${{ secrets.pypi_password }}
run: |
printf "[distutils]\nindex-servers =\n\tpypi\n\n[pypi]\nrepository: https://upload.pypi.org/legacy/\nusername: ${PYPI_USERNAME}\npassword: ${PYPI_PASSWORD}">~/.pypirc
python3 -m twine upload dist/*
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
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@release/v1
with:
password: ${{ secrets.PYPI_API }}

0 comments on commit 79f0b53

Please sign in to comment.