Skip to content

chore(release): version packages (#13) #3

chore(release): version packages (#13)

chore(release): version packages (#13) #3

Workflow file for this run

name: Main
on:
push:
branches: [main]
jobs:
check-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- run: pnpm i
- run: pnpm run lint:check
- run: pnpm run format:check
- run: pnpm run type:check
stable-release:
needs: [check-code]
if: ${{ needs.check-code.result == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- run: pnpm i
- name: Check changesets on @latest
id: changesets
uses: changesets/action@v1
with:
commit: 'chore(release): version packages'
title: 'chore(release): version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy and publish
if: steps.changesets.outputs.hasChangesets == 'false'
run: |
pnpm build
pnpm dlx wrangler pages deploy --project-name=dinui-stable --branch=main ./apps/web/dist
pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
pnpm changeset publish
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
next-release:
needs: [stable-release]
if: ${{ needs.stable-release.result == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- run: pnpm i
- run: pnpm changeset version --snapshot next
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
run: |
pnpm build:packages
pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
pnpm changeset publish --tag next
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}