-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (36 loc) · 1.11 KB
/
publish.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
44
45
46
47
48
49
50
name: prose/publish
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
ci:
name: Build & Publish w/Poetry
strategy:
matrix:
python-version: ["3.10"]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
env:
PROJECT_NAME: "Prose"
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Setup Poetry Configuration 🛠️
run: poetry config pypi-token.pypi $PYPI_API_TOKEN
- name: Install Dependencies
run: poetry install --no-root --no-dev
- name: Build Package 🐍
run: poetry build
- name: Dry-run Publish to PyPI 😬
run: poetry publish --dry-run
- name: Publish to PyPI 🚀
run: poetry publish --skip-existing