-
Notifications
You must be signed in to change notification settings - Fork 22
38 lines (37 loc) · 985 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
name: "CI"
on: # yamllint disable-line rule:truthy rule:comments
push:
branches:
- "main"
- "develop"
tags:
- "v*"
pull_request: ~
jobs:
test:
name: "Run Tests"
runs-on: "ubuntu-20.04"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Run make tests"
run: "make tests"
publish:
name: "Publish to PyPI"
needs:
- "test"
runs-on: "ubuntu-20.04"
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Push to PyPI"
uses: "pypa/gh-action-pypi-publish@release/v1"
with:
user: "__token__"
password: "${{ secrets.PYPI_API_TOKEN }}"