adf0d17497
publish / version_or_publish (push) Has been cancelled
storybook-build / changes (push) Has been cancelled
storybook-build / :storybook-build (push) Has been cancelled
Sync Gradio Skills to Hugging Face / sync-skills (push) Has been cancelled
functional / changes (push) Has been cancelled
functional / build-frontend (push) Has been cancelled
functional / functional-test-SSR=false (push) Has been cancelled
functional / functional-reload (push) Has been cancelled
js / changes (push) Has been cancelled
js / js-test (push) Has been cancelled
docs-build / changes (push) Has been cancelled
docs-build / docs-build (push) Has been cancelled
docs-build / website-build (push) Has been cancelled
functional / functional-test-SSR=true (push) Has been cancelled
hygiene / hygiene-test (push) Has been cancelled
python / changes (push) Has been cancelled
python / build (push) Has been cancelled
python / test-ubuntu-latest-flaky (push) Has been cancelled
python / test-ubuntu-latest-not-flaky (push) Has been cancelled
python / test-windows-latest-flaky (push) Has been cancelled
python / test-windows-latest-not-flaky (push) Has been cancelled
93 lines
3.2 KiB
YAML
93 lines
3.2 KiB
YAML
# safe runs from main
|
|
|
|
name: publish
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
CI: true
|
|
PNPM_CACHE_FOLDER: .pnpm-store
|
|
jobs:
|
|
version_or_publish:
|
|
runs-on: ubuntu-22.04
|
|
environment: publish
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
steps:
|
|
- name: checkout repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
- name: install dependencies
|
|
uses: "gradio-app/gradio/.github/actions/install-all-deps@main"
|
|
with:
|
|
python_version: "3.12"
|
|
skip_build: "false"
|
|
skip_docs_gen: true
|
|
- name: Build packages
|
|
run: |
|
|
. venv/bin/activate
|
|
pnpm package
|
|
pnpm --filter @gradio/client build
|
|
- name: update npm
|
|
run: npm i -g npm@latest
|
|
- name: check node version
|
|
run: node -v
|
|
- name: check npm version
|
|
run: npm -v
|
|
- name: create and publish versions
|
|
id: changesets
|
|
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # @v1
|
|
with:
|
|
version: pnpm ci:version
|
|
commit: "chore: update versions"
|
|
title: "chore: update versions"
|
|
publish: pnpm ci:publish
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GRADIO_PAT }}
|
|
- name: Upload npm logs
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: npm-logs
|
|
path: |
|
|
/home/runner/.npm/_logs/
|
|
~/.npm/_logs/
|
|
retention-days: 7
|
|
if-no-files-found: ignore
|
|
- name: add label to skip chromatic build
|
|
if: ${{ steps.changesets.outputs.pullRequestNumber != '' && steps.changesets.outputs.pullRequestNumber != 'undefined' }}
|
|
run: gh pr edit "$PR_NUMBER" --add-label "no-visual-update"
|
|
env:
|
|
PR_NUMBER: ${{ steps.changesets.outputs.pullRequestNumber }}
|
|
GITHUB_TOKEN: ${{ secrets.GRADIO_PAT }}
|
|
- name: add label to run flaky tests
|
|
if: ${{ steps.changesets.outputs.pullRequestNumber != '' && steps.changesets.outputs.pullRequestNumber != 'undefined' }}
|
|
run: gh pr edit "$PR_NUMBER" --add-label "flaky-tests"
|
|
env:
|
|
PR_NUMBER: ${{ steps.changesets.outputs.pullRequestNumber }}
|
|
GITHUB_TOKEN: ${{ secrets.GRADIO_PAT }}
|
|
- name: add label to run backend tests on Windows
|
|
if: ${{ steps.changesets.outputs.pullRequestNumber != '' && steps.changesets.outputs.pullRequestNumber != 'undefined' }}
|
|
run: gh pr edit "$PR_NUMBER" --add-label "windows-tests"
|
|
env:
|
|
PR_NUMBER: ${{ steps.changesets.outputs.pullRequestNumber }}
|
|
GITHUB_TOKEN: ${{ secrets.GRADIO_PAT }}
|
|
- name: publish to pypi
|
|
if: steps.changesets.outputs.hasChangesets != 'true'
|
|
uses: "gradio-app/github/actions/publish-pypi@main"
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.SDK_AWS_S3_BUCKET_ACCESS_KEY }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.SDK_AWS_S3_BUCKET_SECRET_ACCESS_KEY }}
|
|
AWS_DEFAULT_REGION: us-west-2
|
|
with:
|
|
use-oidc: true
|
|
- name: trigger spaces deploy workflow
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.COMMENT_TOKEN }}
|
|
run: gh workflow run previews-build.yml
|