This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
Packages Deploy #5
Workflow file for this run
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: Packages Deploy | |
on: workflow_dispatch | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release: | |
name: Publish Dev Packages | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Setup PNPM | |
run: | | |
npm install -g pnpm@8 | |
- name: Install Dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build packages | |
run: pnpm build:packages | |
- id: is_dev | |
run: | | |
IS_DEV=${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/changeset-release/main' }} | |
echo "value=$IS_DEV" >> $GITHUB_OUTPUT | |
- name: Publish dev packages | |
if: ${{ steps.is_dev.outputs.value == 'true' }} | |
run: | | |
pnpm changeset version --no-git-tag --snapshot dev | |
pnpm changeset publish --tag next | |
- name: Create Release Pull Request or Publish to npm | |
if: ${{ steps.is_dev.outputs.value == 'false' }} | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
version: pnpm ci:version | |
commit: 'chore: update versions' | |
title: '[Chore] update versions' | |
- name: Publish production components. | |
if: ${{ github.ref == 'refs/heads/main' && steps.changesets.outputs.hasChangesets == 'false' }} | |
run: echo 'testing only' |