chore: prepare demos for Vercel #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
push: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
publish: | |
if: ${{ github.repository_owner == 'universse' }} | |
name: Publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: pnpm | |
node-version: 20 | |
- name: Install dependencies | |
shell: bash | |
run: pnpm i --ignore-scripts | |
- name: Build | |
run: pnpm --filter=palettez build | |
- name: Publish | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
commit: "chore(release): version packages" | |
title: "chore(release): version packages" | |
version: pnpm changeset version && pnpm i --lockfile-only | |
publish: pnpm changeset publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish dev version | |
if: steps.changesets.outputs.published != 'true' | |
run: | | |
git checkout main | |
pnpm changeset version --snapshot dev | |
pnpm changeset publish --tag dev | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |