Skip to content

Commit 220522e

Browse files
authored
Merge branch 'main' into main
2 parents ee5d58f + 58bbe80 commit 220522e

File tree

490 files changed

+30075
-4805
lines changed

Some content is hidden

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

490 files changed

+30075
-4805
lines changed

.github/workflows/agents-publish.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ on:
44
workflow_dispatch:
55
inputs:
66
newversion:
7-
description: "Semantic Version Bump Type (major minor patch)"
7+
type: choice
8+
description: "Semantic Version Bump Type"
89
default: patch
10+
options:
11+
- patch
12+
- minor
13+
- major
914

1015
concurrency:
1116
group: "push-to-main"
@@ -20,11 +25,15 @@ jobs:
2025
steps:
2126
- uses: actions/checkout@v3
2227
with:
28+
# Needed to push the tag and the commit on the main branch, otherwise we get:
29+
# > Run git push --follow-tags
30+
# remote: error: GH006: Protected branch update failed for refs/heads/main.
31+
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
2332
token: ${{ secrets.BOT_ACCESS_TOKEN }}
2433
- run: corepack enable
2534
- uses: actions/setup-node@v3
2635
with:
27-
node-version: "18"
36+
node-version: "20"
2837
cache: "pnpm"
2938
cache-dependency-path: |
3039
packages/agents/pnpm-lock.yaml
@@ -41,17 +50,23 @@ jobs:
4150
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');"
4251
pnpm --filter doc-internal run fix-cdn-versions
4352
git add ../..
44-
git commit -m "🔖 @hugginface/agents $BUMPED_VERSION"
53+
git commit -m "🔖 @huggingface/agents $BUMPED_VERSION"
4554
git tag "agents-v$BUMPED_VERSION"
4655
- run: pnpm --filter agents... build && pnpm publish --no-git-checks .
4756
env:
4857
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49-
- run: git push --follow-tags
58+
- run: git pull --rebase && git push --follow-tags
5059
# hack - reuse actions/setup-node@v3 just to set a new registry
5160
- uses: actions/setup-node@v3
5261
with:
53-
node-version: "18"
62+
node-version: "20"
5463
registry-url: "https://npm.pkg.github.com"
55-
- run: pnpm publish --no-git-checks .
56-
env:
57-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
# Disable for now, until github supports PATs for writing github packages (https://github.com/github/roadmap/issues/558)
65+
# - run: pnpm publish --no-git-checks .
66+
# env:
67+
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
- name: "Update Doc"
69+
uses: peter-evans/repository-dispatch@v2
70+
with:
71+
event-type: doc-build
72+
token: ${{ secrets.BOT_ACCESS_TOKEN }}

.github/workflows/documentation.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ name: Build documentation
22

33
on:
44
workflow_dispatch:
5+
repository_dispatch:
6+
types: [doc-build]
57
push:
68
branches:
79
- main
810
paths:
911
- "README.md"
10-
- "docs/**"
11-
- "packages/hub/package.json"
12-
- "packages/inference/package.json"
13-
- "packages/agents/package.json"
12+
- "packages/hub/README.md"
13+
- "packages/inference/README.md"
14+
- "packages/agents/README.md"
15+
- ".github/workflows/documentation.yml"
1416

1517
jobs:
1618
build:

.github/workflows/gguf-publish.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: GGUF - 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+
15+
concurrency:
16+
group: "push-to-main"
17+
18+
defaults:
19+
run:
20+
working-directory: packages/gguf
21+
22+
jobs:
23+
version_and_release:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
with:
28+
# Needed to push the tag and the commit on the main branch, otherwise we get:
29+
# > Run git push --follow-tags
30+
# remote: error: GH006: Protected branch update failed for refs/heads/main.
31+
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
32+
token: ${{ secrets.BOT_ACCESS_TOKEN }}
33+
- run: corepack enable
34+
- uses: actions/setup-node@v3
35+
with:
36+
node-version: "20"
37+
cache: "pnpm"
38+
cache-dependency-path: |
39+
packages/gguf/pnpm-lock.yaml
40+
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
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+
git commit . -m "🔖 @huggingface/gguf $BUMPED_VERSION"
51+
git tag "gguf-v$BUMPED_VERSION"
52+
53+
- name: "Check Deps are published before publishing this package"
54+
run: pnpm -w check-deps tasks
55+
56+
- run: pnpm publish --no-git-checks .
57+
env:
58+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
59+
- run: git pull --rebase && git push --follow-tags
60+
# hack - reuse actions/setup-node@v3 just to set a new registry
61+
- uses: actions/setup-node@v3
62+
with:
63+
node-version: "20"
64+
registry-url: "https://npm.pkg.github.com"
65+
# Disable for now, until github supports PATs for writing github packages (https://github.com/github/roadmap/issues/558)
66+
# - run: pnpm publish --no-git-checks .
67+
# env:
68+
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/hub-publish.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ on:
44
workflow_dispatch:
55
inputs:
66
newversion:
7-
description: "Semantic Version Bump Type (major minor patch)"
7+
type: choice
8+
description: "Semantic Version Bump Type"
89
default: patch
10+
options:
11+
- patch
12+
- minor
13+
- major
914

1015
concurrency:
1116
group: "push-to-main"
@@ -20,11 +25,15 @@ jobs:
2025
steps:
2126
- uses: actions/checkout@v3
2227
with:
28+
# Needed to push the tag and the commit on the main branch, otherwise we get:
29+
# > Run git push --follow-tags
30+
# remote: error: GH006: Protected branch update failed for refs/heads/main.
31+
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
2332
token: ${{ secrets.BOT_ACCESS_TOKEN }}
2433
- run: corepack enable
2534
- uses: actions/setup-node@v3
2635
with:
27-
node-version: "18"
36+
node-version: "20"
2837
cache: "pnpm"
2938
cache-dependency-path: |
3039
packages/hub/pnpm-lock.yaml
@@ -41,17 +50,27 @@ jobs:
4150
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');"
4251
pnpm --filter doc-internal run fix-cdn-versions
4352
git add ../..
44-
git commit -m "🔖 @hugginface/hub $BUMPED_VERSION"
53+
git commit -m "🔖 @huggingface/hub $BUMPED_VERSION"
4554
git tag "hub-v$BUMPED_VERSION"
55+
56+
- name: "Check Deps are published before publishing this package"
57+
run: pnpm -w check-deps tasks
58+
4659
- run: pnpm publish --no-git-checks .
4760
env:
4861
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49-
- run: git push --follow-tags
62+
- run: git pull --rebase && git push --follow-tags
5063
# hack - reuse actions/setup-node@v3 just to set a new registry
5164
- uses: actions/setup-node@v3
5265
with:
53-
node-version: "18"
66+
node-version: "20"
5467
registry-url: "https://npm.pkg.github.com"
55-
- run: pnpm publish --no-git-checks .
56-
env:
57-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
# Disable for now, until github supports PATs for writing github packages (https://github.com/github/roadmap/issues/558)
69+
# - run: pnpm publish --no-git-checks .
70+
# env:
71+
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
- name: "Update Doc"
73+
uses: peter-evans/repository-dispatch@v2
74+
with:
75+
event-type: doc-build
76+
token: ${{ secrets.BOT_ACCESS_TOKEN }}

.github/workflows/inference-publish.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ on:
44
workflow_dispatch:
55
inputs:
66
newversion:
7-
description: "Semantic Version Bump Type (major minor patch)"
7+
type: choice
8+
description: "Semantic Version Bump Type"
89
default: patch
10+
options:
11+
- patch
12+
- minor
13+
- major
914

1015
concurrency:
1116
group: "push-to-main"
@@ -20,11 +25,15 @@ jobs:
2025
steps:
2126
- uses: actions/checkout@v3
2227
with:
28+
# Needed to push the tag and the commit on the main branch, otherwise we get:
29+
# > Run git push --follow-tags
30+
# remote: error: GH006: Protected branch update failed for refs/heads/main.
31+
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
2332
token: ${{ secrets.BOT_ACCESS_TOKEN }}
2433
- run: corepack enable
2534
- uses: actions/setup-node@v3
2635
with:
27-
node-version: "18"
36+
node-version: "20"
2837
cache: "pnpm"
2938
cache-dependency-path: |
3039
packages/inference/pnpm-lock.yaml
@@ -41,17 +50,22 @@ jobs:
4150
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');"
4251
pnpm --filter doc-internal run fix-cdn-versions
4352
git add ../..
44-
git commit -m "🔖 @hugginface/inference $BUMPED_VERSION"
53+
git commit -m "🔖 @huggingface/inference $BUMPED_VERSION"
4554
git tag "inference-v$BUMPED_VERSION"
55+
56+
- name: "Check Deps are published before publishing this package"
57+
run: pnpm -w check-deps gguf
58+
4659
- run: pnpm publish --no-git-checks .
4760
env:
4861
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49-
- run: git push --follow-tags
62+
- run: git pull --rebase && git push --follow-tags
5063
# hack - reuse actions/setup-node@v3 just to set a new registry
5164
- uses: actions/setup-node@v3
5265
with:
53-
node-version: "18"
66+
node-version: "20"
5467
registry-url: "https://npm.pkg.github.com"
55-
- run: pnpm publish --no-git-checks .
56-
env:
57-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
# Disable for now, until github supports PATs for writing github packages (https://github.com/github/roadmap/issues/558)
69+
# - run: pnpm publish --no-git-checks .
70+
# env:
71+
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/jinja-publish.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ on:
44
workflow_dispatch:
55
inputs:
66
newversion:
7-
description: "Semantic Version Bump Type (major minor patch)"
7+
type: choice
8+
description: "Semantic Version Bump Type"
89
default: patch
10+
options:
11+
- patch
12+
- minor
13+
- major
914

1015
concurrency:
1116
group: "push-to-main"
@@ -20,11 +25,15 @@ jobs:
2025
steps:
2126
- uses: actions/checkout@v3
2227
with:
28+
# Needed to push the tag and the commit on the main branch, otherwise we get:
29+
# > Run git push --follow-tags
30+
# remote: error: GH006: Protected branch update failed for refs/heads/main.
31+
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
2332
token: ${{ secrets.BOT_ACCESS_TOKEN }}
2433
- run: corepack enable
2534
- uses: actions/setup-node@v3
2635
with:
27-
node-version: "18"
36+
node-version: "20"
2837
cache: "pnpm"
2938
cache-dependency-path: |
3039
packages/jinja/pnpm-lock.yaml
@@ -38,17 +47,18 @@ jobs:
3847
BUMPED_VERSION=$(node -p "require('semver').inc('$PACKAGE_VERSION', '${{ github.event.inputs.newversion }}')")
3948
# Update package.json with the new version
4049
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');"
41-
git commit . -m "🔖 @hugginface/jinja $BUMPED_VERSION"
50+
git commit . -m "🔖 @huggingface/jinja $BUMPED_VERSION"
4251
git tag "jinja-v$BUMPED_VERSION"
4352
- run: pnpm publish --no-git-checks .
4453
env:
4554
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46-
- run: git push --follow-tags
55+
- run: git pull --rebase && git push --follow-tags
4756
# hack - reuse actions/setup-node@v3 just to set a new registry
4857
- uses: actions/setup-node@v3
4958
with:
50-
node-version: "18"
59+
node-version: "20"
5160
registry-url: "https://npm.pkg.github.com"
52-
- run: pnpm publish --no-git-checks .
53-
env:
54-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
# Disable for now, until github supports PATs for writing github packages (https://github.com/github/roadmap/issues/558)
62+
# - run: pnpm publish --no-git-checks .
63+
# env:
64+
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/languages-publish.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@ on:
44
workflow_dispatch:
55
inputs:
66
newversion:
7-
description: "Semantic Version Bump Type (major minor patch)"
7+
type: choice
8+
description: "Semantic Version Bump Type"
89
default: patch
10+
options:
11+
- patch
12+
- minor
13+
- major
914

1015
concurrency:
1116
group: "push-to-main"
@@ -20,11 +25,15 @@ jobs:
2025
steps:
2126
- uses: actions/checkout@v3
2227
with:
28+
# Needed to push the tag and the commit on the main branch, otherwise we get:
29+
# > Run git push --follow-tags
30+
# remote: error: GH006: Protected branch update failed for refs/heads/main.
31+
# remote: error: Changes must be made through a pull request. Required status check "lint" is expected.
2332
token: ${{ secrets.BOT_ACCESS_TOKEN }}
2433
- run: corepack enable
2534
- uses: actions/setup-node@v3
2635
with:
27-
node-version: "18"
36+
node-version: "20"
2837
cache: "pnpm"
2938
cache-dependency-path: |
3039
packages/languages/pnpm-lock.yaml
@@ -38,17 +47,18 @@ jobs:
3847
BUMPED_VERSION=$(node -p "require('semver').inc('$PACKAGE_VERSION', '${{ github.event.inputs.newversion }}')")
3948
# Update package.json with the new version
4049
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');"
41-
git commit . -m "🔖 @hugginface/languages $BUMPED_VERSION"
50+
git commit . -m "🔖 @huggingface/languages $BUMPED_VERSION"
4251
git tag "languages-v$BUMPED_VERSION"
4352
- run: pnpm publish --no-git-checks .
4453
env:
4554
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46-
- run: git push --follow-tags
55+
- run: git pull --rebase && git push --follow-tags
4756
# hack - reuse actions/setup-node@v3 just to set a new registry
4857
- uses: actions/setup-node@v3
4958
with:
50-
node-version: "18"
59+
node-version: "20"
5160
registry-url: "https://npm.pkg.github.com"
52-
- run: pnpm publish --no-git-checks .
53-
env:
54-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
# Disable for now, until github supports PATs for writing github packages (https://github.com/github/roadmap/issues/558)
62+
# - run: pnpm publish --no-git-checks .
63+
# env:
64+
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)