-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (57 loc) · 1.91 KB
/
Copy pathmain.yml
File metadata and controls
66 lines (57 loc) · 1.91 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
name: Merge to Main
on:
push:
branches:
- main
- release/mcp-v1
concurrency:
group: release-${{ github.ref_name }}
cancel-in-progress: false
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
changed-packages: ${{ steps.changes.outputs.changed-packages }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install just
run: |
mkdir -p "$HOME/.local/bin"
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh \
| bash -s -- --tag 1.50.0 --to "$HOME/.local/bin"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Sync dependencies
run: uv sync --all-extras --all-packages
- name: Detect package changes
id: changes
run: |
PACKAGES=$(just detect-changes)
if [[ "${{ github.ref_name }}" == "release/mcp-v1" ]]; then
PACKAGES=$(jq -c '[.[] | select(.package_name == "keycardai-mcp")]' <<< "$PACKAGES")
fi
echo "changed-packages=$PACKAGES" >> $GITHUB_OUTPUT
bump-packages:
if: needs.detect-changes.outputs.changed-packages != '[]' && !startsWith(github.event.head_commit.message, 'bump:')
needs: detect-changes
permissions:
contents: write
pull-requests: write
strategy:
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.changed-packages) }}
max-parallel: 1 # Process packages sequentially to avoid race conditions
uses: ./.github/workflows/bump-package.yml
with:
package_name: ${{ matrix.package.package_name }}
package_dir: ${{ matrix.package.package_dir }}
target_branch: ${{ github.ref_name }}
secrets: inherit