-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.35 KB
/
release-please.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
43
44
45
46
47
48
49
50
51
52
53
54
name: Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
id-token: write
issues: write
packages: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: python
path: package
- uses: actions/checkout@v3
if: ${{ steps.release.outputs['package--release_created'] }}
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.11"
if: ${{ steps.release.outputs['package--release_created'] }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
if: ${{ steps.release.outputs['package--release_created'] }}
- name: Poetry install and build
run: |
cd package
poetry install --no-interaction
poetry build
if: ${{ steps.release.outputs['package--release_created'] }}
- name: Publish to PyPI
run: |
cd package
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
if: ${{ steps.release.outputs['package--release_created'] }}