Skip to content

Commit 9c5ba58

Browse files
authored
Merge branch 'main' into patch-1
2 parents 71cf6a4 + 72b0d9b commit 9c5ba58

File tree

473 files changed

+25989
-5616
lines changed

Some content is hidden

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

473 files changed

+25989
-5616
lines changed

.github/workflows/agents-publish.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v3
2727
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.
2832
token: ${{ secrets.BOT_ACCESS_TOKEN }}
2933
- run: corepack enable
3034
- uses: actions/setup-node@v3
3135
with:
32-
node-version: "18"
36+
node-version: "20"
3337
cache: "pnpm"
3438
cache-dependency-path: |
3539
packages/agents/pnpm-lock.yaml
@@ -46,21 +50,23 @@ jobs:
4650
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');"
4751
pnpm --filter doc-internal run fix-cdn-versions
4852
git add ../..
49-
git commit -m "🔖 @hugginface/agents $BUMPED_VERSION"
53+
git commit -m "🔖 @huggingface/agents $BUMPED_VERSION"
5054
git tag "agents-v$BUMPED_VERSION"
5155
- run: pnpm --filter agents... build && pnpm publish --no-git-checks .
5256
env:
5357
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
54-
- run: git push --follow-tags
58+
- run: git pull --rebase && git push --follow-tags
5559
# hack - reuse actions/setup-node@v3 just to set a new registry
5660
- uses: actions/setup-node@v3
5761
with:
58-
node-version: "18"
62+
node-version: "20"
5963
registry-url: "https://npm.pkg.github.com"
60-
- run: pnpm publish --no-git-checks .
61-
env:
62-
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 }}
6368
- name: "Update Doc"
6469
uses: peter-evans/repository-dispatch@v2
6570
with:
6671
event-type: doc-build
72+
token: ${{ secrets.BOT_ACCESS_TOKEN }}

.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: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v3
2727
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.
2832
token: ${{ secrets.BOT_ACCESS_TOKEN }}
2933
- run: corepack enable
3034
- uses: actions/setup-node@v3
3135
with:
32-
node-version: "18"
36+
node-version: "20"
3337
cache: "pnpm"
3438
cache-dependency-path: |
3539
packages/hub/pnpm-lock.yaml
@@ -46,21 +50,27 @@ jobs:
4650
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');"
4751
pnpm --filter doc-internal run fix-cdn-versions
4852
git add ../..
49-
git commit -m "🔖 @hugginface/hub $BUMPED_VERSION"
53+
git commit -m "🔖 @huggingface/hub $BUMPED_VERSION"
5054
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+
5159
- run: pnpm publish --no-git-checks .
5260
env:
5361
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
54-
- run: git push --follow-tags
62+
- run: git pull --rebase && git push --follow-tags
5563
# hack - reuse actions/setup-node@v3 just to set a new registry
5664
- uses: actions/setup-node@v3
5765
with:
58-
node-version: "18"
66+
node-version: "20"
5967
registry-url: "https://npm.pkg.github.com"
60-
- run: pnpm publish --no-git-checks .
61-
env:
62-
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 }}
6372
- name: "Update Doc"
6473
uses: peter-evans/repository-dispatch@v2
6574
with:
6675
event-type: doc-build
76+
token: ${{ secrets.BOT_ACCESS_TOKEN }}

.github/workflows/inference-publish.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v3
2727
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.
2832
token: ${{ secrets.BOT_ACCESS_TOKEN }}
2933
- run: corepack enable
3034
- uses: actions/setup-node@v3
3135
with:
32-
node-version: "18"
36+
node-version: "20"
3337
cache: "pnpm"
3438
cache-dependency-path: |
3539
packages/inference/pnpm-lock.yaml
@@ -46,17 +50,22 @@ jobs:
4650
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');"
4751
pnpm --filter doc-internal run fix-cdn-versions
4852
git add ../..
49-
git commit -m "🔖 @hugginface/inference $BUMPED_VERSION"
53+
git commit -m "🔖 @huggingface/inference $BUMPED_VERSION"
5054
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+
5159
- run: pnpm publish --no-git-checks .
5260
env:
5361
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
54-
- run: git push --follow-tags
62+
- run: git pull --rebase && git push --follow-tags
5563
# hack - reuse actions/setup-node@v3 just to set a new registry
5664
- uses: actions/setup-node@v3
5765
with:
58-
node-version: "18"
66+
node-version: "20"
5967
registry-url: "https://npm.pkg.github.com"
60-
- run: pnpm publish --no-git-checks .
61-
env:
62-
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: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v3
2727
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.
2832
token: ${{ secrets.BOT_ACCESS_TOKEN }}
2933
- run: corepack enable
3034
- uses: actions/setup-node@v3
3135
with:
32-
node-version: "18"
36+
node-version: "20"
3337
cache: "pnpm"
3438
cache-dependency-path: |
3539
packages/jinja/pnpm-lock.yaml
@@ -43,17 +47,18 @@ jobs:
4347
BUMPED_VERSION=$(node -p "require('semver').inc('$PACKAGE_VERSION', '${{ github.event.inputs.newversion }}')")
4448
# Update package.json with the new version
4549
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');"
46-
git commit . -m "🔖 @hugginface/jinja $BUMPED_VERSION"
50+
git commit . -m "🔖 @huggingface/jinja $BUMPED_VERSION"
4751
git tag "jinja-v$BUMPED_VERSION"
4852
- run: pnpm publish --no-git-checks .
4953
env:
5054
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51-
- run: git push --follow-tags
55+
- run: git pull --rebase && git push --follow-tags
5256
# hack - reuse actions/setup-node@v3 just to set a new registry
5357
- uses: actions/setup-node@v3
5458
with:
55-
node-version: "18"
59+
node-version: "20"
5660
registry-url: "https://npm.pkg.github.com"
57-
- run: pnpm publish --no-git-checks .
58-
env:
59-
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: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v3
2727
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.
2832
token: ${{ secrets.BOT_ACCESS_TOKEN }}
2933
- run: corepack enable
3034
- uses: actions/setup-node@v3
3135
with:
32-
node-version: "18"
36+
node-version: "20"
3337
cache: "pnpm"
3438
cache-dependency-path: |
3539
packages/languages/pnpm-lock.yaml
@@ -43,17 +47,18 @@ jobs:
4347
BUMPED_VERSION=$(node -p "require('semver').inc('$PACKAGE_VERSION', '${{ github.event.inputs.newversion }}')")
4448
# Update package.json with the new version
4549
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');"
46-
git commit . -m "🔖 @hugginface/languages $BUMPED_VERSION"
50+
git commit . -m "🔖 @huggingface/languages $BUMPED_VERSION"
4751
git tag "languages-v$BUMPED_VERSION"
4852
- run: pnpm publish --no-git-checks .
4953
env:
5054
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
51-
- run: git push --follow-tags
55+
- run: git pull --rebase && git push --follow-tags
5256
# hack - reuse actions/setup-node@v3 just to set a new registry
5357
- uses: actions/setup-node@v3
5458
with:
55-
node-version: "18"
59+
node-version: "20"
5660
registry-url: "https://npm.pkg.github.com"
57-
- run: pnpm publish --no-git-checks .
58-
env:
59-
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/lint.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,21 @@ jobs:
1818
- name: "Extracting the merge base into 'SINCE'"
1919
id: since
2020
run: |
21-
if [ -z "${{ github.event.pull_request.head.ref }}" ]
21+
if [ -z $PR_REF ]
2222
then
23-
echo "SINCE=${{ github.sha }}^1" >> $GITHUB_OUTPUT
23+
echo "SINCE=$SHA^1" >> $GITHUB_OUTPUT
2424
else
25-
echo "SINCE=$(git merge-base origin/${{ github.event.pull_request.base.ref }} ${{ github.sha }})" >> $GITHUB_OUTPUT
25+
echo "SINCE=$(git merge-base origin/$PR_REF $SHA)" >> $GITHUB_OUTPUT
2626
fi
27+
env:
28+
PR_REF: ${{ github.event.pull_request.head.ref }}
29+
SHA: ${{ github.sha }}
2730

2831
- run: corepack enable
2932

3033
- uses: actions/setup-node@v3
3134
with:
32-
node-version: "18"
35+
node-version: "20"
3336
cache: "pnpm"
3437
cache-dependency-path: "**/pnpm-lock.yaml"
3538
- run: |
@@ -42,7 +45,11 @@ jobs:
4245
4346
- name: "Checking format errors"
4447
run: |
45-
pnpm --filter ...[${{ steps.since.outputs.SINCE }}] format:check
48+
# Could also use pnpm --filter [${{ steps.since.outputs.SINCE }}] format:check
49+
# But this way we can see the diff
50+
pnpm --filter [${{ steps.since.outputs.SINCE }}] format
51+
git diff | head -n 100
52+
git diff --name-only --exit-code
4653
4754
- name: Check types
4855
run: pnpm --filter ...[${{ steps.since.outputs.SINCE }}] check

0 commit comments

Comments
 (0)