-
-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (53 loc) · 1.55 KB
/
publish-package.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
51
52
53
54
55
56
57
58
59
60
61
62
name: Publish Package
on:
release:
types: [published]
jobs:
publish-docs-and-package:
name: Publish Docs and Package
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Poetry
uses: snok/[email protected]
with:
version: 1.4.0
- name: Setup Poetry
run: |
poetry config virtualenvs.in-project true
- name: Cache
id: cache
uses: actions/[email protected]
with:
path: '.venv'
key: publish-package-${{ hashFiles('poetry.lock') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
poetry install --without dev
- name: Install Package
run: |
poetry install --without dev
# ----------------------------------------
# No docs for now
# ----------------------------------------
# - name: Build Docs 🔨
# run: |
# cp README.md docs/index.md
# poetry run mkdocs build
# - name: Deploy Page 🚀
# uses: JamesIves/[email protected]
# with:
# branch: gh-pages
# folder: site
- name: Publish to PyPI
run: |
poetry build
poetry publish \
--username ${{ secrets.PYPI_USERNAME }} \
--password ${{ secrets.PYPI_PASSWORD }}