-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.38 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
45
46
47
48
49
50
51
on:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
name: Release and publish packages
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
token: ${{ secrets.GH_PAT }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
# Check-out the repository
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created == 'true' }}
with:
ref: ${{ github.event.after }}
# Set up Python
- uses: actions/setup-python@v2
if: ${{ steps.release.outputs.release_created == 'true' }}
with:
python-version: 3.11
# Set up Poetry
- uses: snok/install-poetry@v1
if: ${{ steps.release.outputs.release_created == 'true' }}
with:
virtualenvs-create: true
virtualenvs-in-project: true
# Configure basic credentials for PyPI
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_PASSWORD }}"
if: ${{ steps.release.outputs.release_created == 'true' }}
# Build and publish package
- run: poetry build
if: ${{ steps.release.outputs.release_created == 'true' }}
- run: poetry publish
if: ${{ steps.release.outputs.release_created == 'true' }}