Buckets:
| name: Tiny Agents - Version and Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| newversion: | |
| type: choice | |
| description: "Semantic Version Bump Type" | |
| default: patch | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| bypass_deps_check: | |
| type: boolean | |
| description: "Bypass dependency checking" | |
| default: false | |
| concurrency: | |
| group: "push-to-main" # Consider changing this if tiny-agents has its own release concurrency group | |
| defaults: | |
| run: | |
| working-directory: packages/tiny-agents | |
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: write | |
| jobs: | |
| version_and_release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| token: ${{ secrets.BOT_ACCESS_TOKEN }} | |
| - run: npm install -g corepack@latest && corepack enable | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| cache-dependency-path: | | |
| packages/tiny-agents/pnpm-lock.yaml | |
| packages/doc-internal/pnpm-lock.yaml | |
| - run: pnpm install | |
| - run: git config --global user.name machineuser | |
| - run: git config --global user.email infra+machineuser@huggingface.co | |
| - run: | | |
| PACKAGE_VERSION=$(node -p "require('./package.json').version") | |
| BUMPED_VERSION=$(node -p "require('semver').inc('$PACKAGE_VERSION', '${{ github.event.inputs.newversion }}')") | |
| # Update package.json with the new version | |
| 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');" | |
| pnpm --filter doc-internal run fix-cdn-versions | |
| git add ../.. | |
| git commit -m "🔖 @huggingface/tiny-agents $BUMPED_VERSION" | |
| git tag "tiny-agents-v$BUMPED_VERSION" | |
| echo "RELEASE_TAG=tiny-agents-v$BUMPED_VERSION" >> $GITHUB_ENV | |
| # Add checks for dependencies if needed, similar to hub-publish.yml | |
| - if: ${{ !github.event.inputs.bypass_deps_check }} | |
| name: "Check Deps are published before publishing this package" | |
| run: pnpm -w check-deps inference && pnpm -w check-deps tasks # Review if these specific deps apply to tiny-agents | |
| - run: (git pull --rebase && git push && git push origin "$RELEASE_TAG") || (git pull --rebase && git push && git push origin "$RELEASE_TAG") | |
| - run: pnpm publish --no-git-checks . | |
| # hack - reuse actions/setup-node@v4 just to set a new registry | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| registry-url: "https://npm.pkg.github.com" | |
| - run: pnpm publish --no-git-checks . | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: "Update Doc" | |
| uses: peter-evans/repository-dispatch@v2 | |
| with: | |
| event-type: doc-build | |
| token: ${{ secrets.BOT_ACCESS_TOKEN }} | |
| - name: Create GitHub Release | |
| run: gh release create "$RELEASE_TAG" | |
| working-directory: . | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
Xet Storage Details
- Size:
- 3.19 kB
- Xet hash:
- dd5eeee882b7b2837b4cd8daf21064afea16cb864b0e28ba81925e968f1a51aa
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.