Skip to content

Commit

Permalink
Enable github actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrichar1 committed Aug 9, 2021
1 parent 4db6c4e commit 2363190
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This is a basic workflow to help you get started with Actions

name: Liveandletdie Tox

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Setup Tox
run: pip install tox

- name: Run Tox
run: tox -e py3

- name: Install pypi/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish to PyPI
# Only publish on tagged pushes when building py3.6
if: matrix.version == '3.6' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 2363190

Please sign in to comment.