-
Notifications
You must be signed in to change notification settings - Fork 137
65 lines (56 loc) · 1.6 KB
/
release-please.yml
File metadata and controls
65 lines (56 loc) · 1.6 KB
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
55
56
57
58
59
60
61
62
63
64
65
name: Release Please
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- uses: googleapis/release-please-action@v4
id: release
with:
# Use the config file for configuration
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
# The branch to create release PRs from
target-branch: master
# GitHub token for creating PRs and releases
token: ${{ secrets.GITHUB_TOKEN }}
build-and-publish:
needs: release-please
runs-on: ubuntu-latest
if: needs.release-please.outputs.release_created
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.release-please.outputs.tag_name }}
- name: Install UV
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build the distribution
run: |
uv build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}