-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (34 loc) · 1.16 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
name: Publish Python package to Pypi
on:
release:
types:
- published
jobs:
publish:
name: Publish release
runs-on: ubuntu-latest
env:
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.POETRY_HTTP_BASIC_PYPI_PASSWORD }}
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.POETRY_HTTP_BASIC_PYPI_USERNAME }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install tools (Poetry)
uses: Gr1N/setup-poetry@v8
- name: Get full python version
id: full-python-version
shell: bash
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
- name: Set up cache
uses: actions/cache@v3
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-publish-${{ hashFiles('**/poetry.lock') }}
- name: Install remaining CI/CD tools and dependencies
run: make setup-cicd-publish-stage
- name: Publish to repository
run: make publish