Skip to content

Commit

Permalink
cicd: simplify workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
asdf8601 committed Feb 10, 2022
1 parent 52394b6 commit b341566
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 39 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/pypi_wheel.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:
branches: [ master ]

jobs:

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

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -25,21 +25,22 @@ jobs:
run: make lint
- name: Test with pytest
run: make test

dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup venv
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
if: github.event_name == 'release' && github.event.action == 'created'
uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: make venv
- name: Build package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
if: github.event_name == 'release' && github.event.action == 'created'
run: make build
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
if: github.event_name == 'release' && github.event.action == 'created'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand Down

0 comments on commit b341566

Please sign in to comment.