Skip to content

Commit 9079883

Browse files
authored
Merge branch 'main' into patch-1
2 parents 9b85205 + 2413423 commit 9079883

File tree

378 files changed

+17585
-14463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

378 files changed

+17585
-14463
lines changed

.github/workflows/agents-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- run: pnpm --filter agents... build && pnpm publish --no-git-checks .
5656
env:
5757
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
58-
- run: git pull --rebase && git push --follow-tags
58+
- run: (git pull --rebase && git push --follow-tags) || (git pull --rebase && git push --follow-tags)
5959
# hack - reuse actions/setup-node@v3 just to set a new registry
6060
- uses: actions/setup-node@v3
6161
with:

.github/workflows/blob-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- run: pnpm publish --no-git-checks .
5454
env:
5555
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
56-
- run: git pull --rebase && git push --follow-tags
56+
- run: (git pull --rebase && git push --follow-tags) || (git pull --rebase && git push --follow-tags)
5757
# hack - reuse actions/setup-node@v3 just to set a new registry
5858
- uses: actions/setup-node@v3
5959
with:

.github/workflows/dduf-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- run: pnpm publish --no-git-checks .
5757
env:
5858
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
59-
- run: git pull --rebase && git push --follow-tags
59+
- run: (git pull --rebase && git push --follow-tags) || (git pull --rebase && git push --follow-tags)
6060
# hack - reuse actions/setup-node@v3 just to set a new registry
6161
- uses: actions/setup-node@v3
6262
with:

.github/workflows/gguf-publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
- patch
1212
- minor
1313
- major
14+
bypass_deps_check:
15+
type: boolean
16+
description: "Bypass dependency checking"
17+
default: false
1418

1519
concurrency:
1620
group: "push-to-main"
@@ -50,13 +54,14 @@ jobs:
5054
git commit . -m "🔖 @huggingface/gguf $BUMPED_VERSION"
5155
git tag "gguf-v$BUMPED_VERSION"
5256
53-
- name: "Check Deps are published before publishing this package"
57+
- if: ${{ !github.event.inputs.bypass_deps_check }}
58+
name: "Check Deps are published before publishing this package"
5459
run: pnpm -w check-deps tasks
5560

5661
- run: pnpm publish --no-git-checks .
5762
env:
5863
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
59-
- run: git pull --rebase && git push --follow-tags
64+
- run: (git pull --rebase && git push --follow-tags) || (git pull --rebase && git push --follow-tags)
6065
# hack - reuse actions/setup-node@v3 just to set a new registry
6166
- uses: actions/setup-node@v3
6267
with:

.github/workflows/hub-publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
- patch
1212
- minor
1313
- major
14+
bypass_deps_check:
15+
type: boolean
16+
description: "Bypass dependency checking"
17+
default: false
1418

1519
concurrency:
1620
group: "push-to-main"
@@ -53,13 +57,14 @@ jobs:
5357
git commit -m "🔖 @huggingface/hub $BUMPED_VERSION"
5458
git tag "hub-v$BUMPED_VERSION"
5559
56-
- name: "Check Deps are published before publishing this package"
60+
- if: ${{ !github.event.inputs.bypass_deps_check }}
61+
name: "Check Deps are published before publishing this package"
5762
run: pnpm -w check-deps tasks
5863

5964
- run: pnpm publish --no-git-checks .
6065
env:
6166
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
62-
- run: git pull --rebase && git push --follow-tags
67+
- run: (git pull --rebase && git push --follow-tags) || (git pull --rebase && git push --follow-tags)
6368
# hack - reuse actions/setup-node@v3 just to set a new registry
6469
- uses: actions/setup-node@v3
6570
with:

.github/workflows/inference-publish.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
- patch
1212
- minor
1313
- major
14+
bypass_deps_check:
15+
type: boolean
16+
description: "Bypass dependency checking"
17+
default: false
1418

1519
concurrency:
1620
group: "push-to-main"
@@ -48,18 +52,20 @@ jobs:
4852
BUMPED_VERSION=$(node -p "require('semver').inc('$PACKAGE_VERSION', '${{ github.event.inputs.newversion }}')")
4953
# Update package.json with the new version
5054
node -e "const fs = require('fs'); const package = JSON.parse(fs.readFileSync('./package.json')); package.version = '$BUMPED_VERSION'; fs.writeFileSync('./package.json', JSON.stringify(package, null, '\t') + '\n');"
55+
pnpm --filter inference package-to-ts
5156
pnpm --filter doc-internal run fix-cdn-versions
5257
git add ../..
5358
git commit -m "🔖 @huggingface/inference $BUMPED_VERSION"
5459
git tag "inference-v$BUMPED_VERSION"
5560
56-
- name: "Check Deps are published before publishing this package"
61+
- if: ${{ !github.event.inputs.bypass_deps_check }}
62+
name: "Check Deps are published before publishing this package"
5763
run: pnpm -w check-deps tasks
5864

5965
- run: pnpm publish --no-git-checks .
6066
env:
6167
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
62-
- run: git pull --rebase && git push --follow-tags
68+
- run: (git pull --rebase && git push --follow-tags) || (git pull --rebase && git push --follow-tags)
6369
# hack - reuse actions/setup-node@v3 just to set a new registry
6470
- uses: actions/setup-node@v3
6571
with:

.github/workflows/jinja-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- run: pnpm publish --no-git-checks .
5353
env:
5454
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
55-
- run: git pull --rebase && git push --follow-tags
55+
- run: (git pull --rebase && git push --follow-tags) || (git pull --rebase && git push --follow-tags)
5656
# hack - reuse actions/setup-node@v3 just to set a new registry
5757
- uses: actions/setup-node@v3
5858
with:

.github/workflows/languages-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- run: pnpm publish --no-git-checks .
5353
env:
5454
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
55-
- run: git pull --rebase && git push --follow-tags
55+
- run: (git pull --rebase && git push --follow-tags) || (git pull --rebase && git push --follow-tags)
5656
# hack - reuse actions/setup-node@v3 just to set a new registry
5757
- uses: actions/setup-node@v3
5858
with:

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
run: |
4848
# Could also use pnpm --filter [${{ steps.since.outputs.SINCE }}] format:check
4949
# But this way we can see the diff
50-
pnpm --filter [${{ steps.since.outputs.SINCE }}] format
50+
pnpm -r format
5151
git diff | head -n 100
5252
git diff --name-only --exit-code
5353
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: MCP Client - Version and Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
newversion:
7+
type: choice
8+
description: "Semantic Version Bump Type"
9+
default: patch
10+
options:
11+
- patch
12+
- minor
13+
- major
14+
bypass_deps_check:
15+
type: boolean
16+
description: "Bypass dependency checking"
17+
default: false
18+
19+
concurrency:
20+
group: "push-to-main"
21+
22+
defaults:
23+
run:
24+
working-directory: packages/mcp-client
25+
26+
jobs:
27+
version_and_release:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v3
31+
with:
32+
token: ${{ secrets.BOT_ACCESS_TOKEN }}
33+
- run: npm install -g corepack@latest && corepack enable
34+
- uses: actions/setup-node@v3
35+
with:
36+
node-version: "20"
37+
cache: "pnpm"
38+
cache-dependency-path: |
39+
packages/mcp-client/pnpm-lock.yaml
40+
packages/doc-internal/pnpm-lock.yaml
41+
registry-url: "https://registry.npmjs.org"
42+
- run: pnpm install
43+
- run: git config --global user.name machineuser
44+
- run: git config --global user.email [email protected]
45+
- run: |
46+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
47+
BUMPED_VERSION=$(node -p "require('semver').inc('$PACKAGE_VERSION', '${{ github.event.inputs.newversion }}')")
48+
# Update package.json with the new version
49+
node -e "const fs = require('fs'); const package = JSON.parse(fs.readFileSync('./package.json')); package.version = '$BUMPED_VERSION'; fs.writeFileSync('./package.json', JSON.stringify(package, null, '\t') + '\n');"
50+
pnpm --filter doc-internal run fix-cdn-versions
51+
git add ../..
52+
git commit -m "🔖 @huggingface/mcp-client $BUMPED_VERSION"
53+
git tag "mcp-client-v$BUMPED_VERSION"
54+
55+
# Add checks for dependencies if needed, similar to hub-publish.yml
56+
- if: ${{ !github.event.inputs.bypass_deps_check }}
57+
name: "Check Deps are published before publishing this package"
58+
run: pnpm -w check-deps inference && pnpm -w check-deps tasks
59+
60+
- run: pnpm publish --no-git-checks .
61+
env:
62+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
63+
- run: (git pull --rebase && git push --follow-tags) || (git pull --rebase && git push --follow-tags)
64+
# hack - reuse actions/setup-node@v3 just to set a new registry
65+
- uses: actions/setup-node@v3
66+
with:
67+
node-version: "20"
68+
registry-url: "https://npm.pkg.github.com"
69+
# Disable for now, until github supports PATs for writing github packages (https://github.com/github/roadmap/issues/558)
70+
# - run: pnpm publish --no-git-checks .
71+
# env:
72+
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
- name: "Update Doc"
74+
uses: peter-evans/repository-dispatch@v2
75+
with:
76+
event-type: doc-build
77+
token: ${{ secrets.BOT_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)