gradio/.github/workflows/publish-npm.yml
pngwn 96802fa135
Fix again (#4728)
* fix

* fix

* fix

* asdasd
2023-06-29 15:41:26 +01:00

50 lines
1.6 KiB
YAML

name: Changesets
on:
push:
branches:
- main
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
NODE_OPTIONS: "--max-old-space-size=4096"
jobs:
version:
runs-on: ubuntu-latest
steps:
- name: checkout code repository
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: install dependencies
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'
- name: Build packages
run: |
. venv/bin/activate
pip install build
pnpm css
pnpm --filter @gradio/client --filter @gradio/lite build
- name: create and publish versions
id: changesets
uses: changesets/action@v1
with:
version: pnpm ci:version
commit: "chore: update versions"
title: "chore: update versions"
publish: pnpm ci:publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
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