-
Notifications
You must be signed in to change notification settings - Fork 76
79 lines (65 loc) · 1.87 KB
/
Copy pathrelease-please.yml
File metadata and controls
79 lines (65 loc) · 1.87 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
issues: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
pr: ${{ steps.release.outputs.pr }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
config-file: .release-please-config.json
manifest-file: .release-please-manifest.json
test-pypi:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.pr }}
steps:
- uses: actions/checkout@v4
- name: Set up the environment
uses: ./.github/actions/setup-uv-env
- name: Build package
run: uv build
- name: Publish to Test PyPI
env:
UV_PUBLISH_TOKEN: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
if [ -n "$UV_PUBLISH_TOKEN" ]; then
uv publish --repository testpypi
else
echo "TEST_PYPI_TOKEN not set, skipping test PyPI publish"
fi
publish:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v4
- name: Set up the environment
uses: ./.github/actions/setup-uv-env
- name: Build package
run: uv build
- name: Publish to PyPI
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: uv publish
deploy-docs:
runs-on: ubuntu-latest
needs: publish
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v4
- name: Set up the environment
uses: ./.github/actions/setup-uv-env
- name: Deploy documentation
run: make docs-deploy