Skip to content

ci: disable running release ci when prs are openned #17

ci: disable running release ci when prs are openned

ci: disable running release ci when prs are openned #17

Workflow file for this run

name: build
on:
push:
branches: [main]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.9]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements_dev.txt
- name: Run tests
run: tox -vv
release:
name: Release
runs-on: ubuntu-latest
needs: [ test ]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install twine
run: |
pip install twine
pip install wheel
pip install setuptools
- name: Upload wheel
if: ${{ github.ref == 'refs/heads/main' }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
TWINE_NON_INTERACTIVE: 1
run: |
python setup.py bdist_wheel
twine upload dist/*.whl