-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1005 Bytes
/
cd.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
39
40
41
42
43
name: CD
on:
workflow_run:
workflows: ["CI"]
types: [completed]
jobs:
pypi-publish:
name: Upload release to PyPI
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/seclook
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies with Poetry
run: |
poetry install
- name: Build package with Poetry
run: |
poetry build
- name: Publish package distributions to PyPI with Poetry
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}