Skip to content

Commit

Permalink
Add publish pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
twsl committed Nov 3, 2021
1 parent 07db34b commit 9515ae6
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2.2.2
with:
python-version: "3.8"

- name: Install poetry
run: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -

- name: Set up cache
uses: actions/cache@v2.1.6
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}

- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
- name: Build
run: |
poetry build
- name: publish
run: |
poetry publish -u "__token__" -p ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 9515ae6

Please sign in to comment.