2023-03-22 21:46:23 +08:00
|
|
|
name: Changesets
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
PNPM_CACHE_FOLDER: .pnpm-store
|
|
|
|
jobs:
|
|
|
|
version:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: checkout code repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-05-13 04:22:41 +08:00
|
|
|
persist-credentials: false
|
2023-03-23 01:53:35 +08:00
|
|
|
- name: Setup pnpm
|
2023-05-14 21:14:44 +08:00
|
|
|
uses: pnpm/action-setup@v2
|
2023-03-23 01:53:35 +08:00
|
|
|
with:
|
2023-06-02 16:13:58 +08:00
|
|
|
version: 8
|
2023-03-22 21:46:23 +08:00
|
|
|
- name: setup node.js
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
2023-03-23 01:53:35 +08:00
|
|
|
cache: pnpm
|
2023-03-28 07:12:58 +08:00
|
|
|
cache-dependency-path: pnpm-lock.yaml
|
2023-03-23 01:53:35 +08:00
|
|
|
node-version: 18
|
2023-05-17 06:21:40 +08:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2023-03-22 21:46:23 +08:00
|
|
|
- name: install dependencies
|
2023-05-13 03:40:54 +08:00
|
|
|
run: pnpm install --frozen-lockfile
|
2023-04-03 21:33:01 +08:00
|
|
|
- name: Build packages
|
|
|
|
run: pnpm --filter @gradio/client 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 }}
|
|
|
|
- name: label PR
|
|
|
|
if: ${{ steps.changesets.outputs.pullRequestNumber != '' && steps.changesets.outputs.pullRequestNumber != 'undefined' }}
|
|
|
|
run: gh pr edit "$PR_NUMBER" --add-label "no-changelog-update"
|
|
|
|
env:
|
|
|
|
PR_NUMBER: ${{ steps.changesets.outputs.pullRequestNumber }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GRADIO_PAT }} # Not sure if this one is required
|