-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.11 KB
/
release.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
name: Release
on:
push:
branches:
- release
jobs:
run_test_suite_workflow:
uses: ./.github/workflows/test_suite.yml
with:
branch: release
setup_poetry_and_publish_to_pypi:
runs-on: ubuntu-latest
needs: run_test_suite_workflow
steps:
- name: Checkout code on release
uses: actions/checkout@v4
with:
ref: release
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Configure GITHUB_TOKEN for Poetry
run: git config --global url."https://github.com/".insteadOf "[email protected]:"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate lock file
run: poetry lock
- name: Install dependencies
run: poetry install --no-root --with dev
- name: Build Python package and publish to PyPI
if: ${{ needs.run_test_suite_workflow.result == 'success' }}
env:
PYPI_LOCAST_TOKEN: ${{ secrets.PYPI_LOCAST_TOKEN }}
run: poetry publish --build -u __token__ -p $PYPI_LOCAST_TOKEN