-
Notifications
You must be signed in to change notification settings - Fork 32
38 lines (35 loc) · 862 Bytes
/
deploy.yml
File metadata and controls
38 lines (35 loc) · 862 Bytes
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: Publish
on:
workflow_dispatch:
push:
branches: [master]
defaults:
run:
shell: bash
jobs:
deploy:
if: github.repository == 'ocf/ocflib'
name: Publish
runs-on: self-hosted
steps:
- name: Checkout branch
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Install dependencies
run: |
poetry --version
poetry check --no-interaction
poetry config virtualenvs.in-project true
poetry install --no-interaction
- name: Run tests
run: |
poetry run pytest
- name: Build package
run: |
poetry build --no-interaction
- name: Publish to PyPi
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry publish --username __token__ --password $PYPI_TOKEN