2023-03-22 21:46:23 +08:00
|
|
|
name: Changesets
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-06-29 22:41:26 +08:00
|
|
|
|
2023-03-22 21:46:23 +08:00
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
PNPM_CACHE_FOLDER: .pnpm-store
|
2023-06-29 22:41:26 +08:00
|
|
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
2023-03-22 21:46:23 +08:00
|
|
|
jobs:
|
2023-07-22 02:13:21 +08:00
|
|
|
version_or_publish:
|
|
|
|
runs-on: ubuntu-22.04
|
2023-03-22 21:46:23 +08:00
|
|
|
steps:
|
2023-07-22 02:13:21 +08:00
|
|
|
- name: checkout repo
|
2023-03-22 21:46:23 +08:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-05-13 04:22:41 +08:00
|
|
|
persist-credentials: false
|
2023-03-22 21:46:23 +08:00
|
|
|
- name: install dependencies
|
2023-06-29 21:07:14 +08:00
|
|
|
uses: "./.github/actions/install-all-deps"
|
|
|
|
with:
|
|
|
|
always-install-pnpm: true
|
|
|
|
node_auth_token: ${{ secrets.NPM_TOKEN }}
|
|
|
|
npm_token: ${{ secrets.NPM_TOKEN }}
|
|
|
|
skip_build: 'true'
|
2023-04-03 21:33:01 +08:00
|
|
|
- name: Build packages
|
2023-06-29 21:19:29 +08:00
|
|
|
run: |
|
|
|
|
. venv/bin/activate
|
|
|
|
pip install build
|
2023-06-29 22:33:32 +08:00
|
|
|
pnpm css
|
2023-06-29 21:19:29 +08:00
|
|
|
pnpm --filter @gradio/client --filter @gradio/lite build
|
2023-03-22 21:46:23 +08:00
|
|
|
- name: create and publish versions
|
2023-05-14 21:14:44 +08:00
|
|
|
id: changesets
|
2023-03-22 21:46:23 +08:00
|
|
|
uses: changesets/action@v1
|
|
|
|
with:
|
2023-05-13 03:21:58 +08:00
|
|
|
version: pnpm ci:version
|
2023-03-22 21:46:23 +08:00
|
|
|
commit: "chore: update versions"
|
|
|
|
title: "chore: update versions"
|
2023-03-22 22:42:58 +08:00
|
|
|
publish: pnpm ci:publish
|
2023-03-22 21:46:23 +08:00
|
|
|
env:
|
2023-03-23 01:53:35 +08:00
|
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2023-05-17 06:21:40 +08:00
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2023-05-14 21:14:44 +08:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GRADIO_PAT }}
|
2023-07-22 02:13:21 +08:00
|
|
|
- name: publish to pypi
|
|
|
|
if: steps.changesets.outputs.hasChangesets != 'true'
|
|
|
|
uses: "gradio-app/github/actions/publish-pypi@main"
|
|
|
|
with:
|
|
|
|
user: __token__
|
|
|
|
passwords: |
|
|
|
|
gradio-test-pypi:${{ secrets.PYPI_API_TOKEN }}
|
|
|
|
gradio-test-client-pypi:${{ secrets.PYPI_GRADIO_CLIENT_TOKEN }}
|