-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (82 loc) · 2.41 KB
/
release-please.yml
File metadata and controls
100 lines (82 loc) · 2.41 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Release Please
on:
push:
branches: [main]
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: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
- name: Regenerate release notes
if: ${{ steps.release.outputs.release_created == 'true' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/${{ github.repository }}/releases/generate-notes \
-f tag_name=${{ steps.release.outputs.tag_name }} \
--jq '.body' \
| gh release edit ${{ steps.release.outputs.tag_name }} \
--repo ${{ github.repository }} \
--notes-file -
ci:
name: CI
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.13"]
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: make install
- name: Lint
run: make lint
- name: Typecheck
run: make typecheck
- name: Test
run: make test
publish:
name: Build & Publish
needs: [release-please, ci]
if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/mlx-stack
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ needs.release-please.outputs.tag_name }}
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Build package
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1