Skip to content

Create build-release.yml #1

Create build-release.yml

Create build-release.yml #1

Workflow file for this run

name: Build and Release
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build Package
runs-on: ubuntu-latest
steps:
- name: Checkout code
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 setuptools wheel twine
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Upload to PyPI
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}