-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (38 loc) · 1.11 KB
/
release.yaml
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
name: Release
on:
release:
types:
- published
permissions:
contents: read
jobs:
pypi-publish:
name: Publish Release
runs-on: "ubuntu-latest"
environment:
name: pypi
url: https://pypi.org/p/hexital
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install and configure Poetry
uses: snok/install-poetry@v1.3.4
with:
version: 1.5.1
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}"
- name: Build and Publish package to PyPI
run: poetry publish --build