-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.08 KB
/
release.yml
File metadata and controls
44 lines (37 loc) · 1.08 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
name: Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
config-file: .release-please-config.json
manifest-file: .release-please-manifest.json
# Only release to PyPI when a new release is created
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- name: Install uv
if: ${{ steps.release.outputs.release_created }}
uses: astral-sh/setup-uv@v5
with:
python-version: "3.11"
enable-cache: true
- name: Update version in __init__.py
if: ${{ steps.release.outputs.release_created }}
run: |
uv run scripts/update_version.py
- name: Build and publish package
if: ${{ steps.release.outputs.release_created }}
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
uv build
uv publish