Merge pull request #108 from m10rten/changeset-release/main #205
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: Main (packages) | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "packages/**" | |
- ".github/workflows/main_push_packages.yaml" | |
- ".changeset/**" | |
- pnpm-lock.yaml | |
- package.json | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
node-version: [20.x, 22.x] | |
steps: | |
- uses: actions/checkout@v4.1.4 | |
- uses: pnpm/action-setup@v3.0.0 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v4.0.2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: pnpm | |
# install | |
- run: pnpm install | |
name: Install dependencies | |
- name: Generate deps 🍪 | |
run: pnpm run packages:generate | |
env: | |
CI: true | |
- name: Verify Packages 🧷📦,⚡ | |
run: pnpm turbo --filter "./packages/**" typecheck lint --concurrency 100% | |
- name: Check packages and create build 🧪,🔨, | |
run: pnpm turbo --filter "./packages/**" build test --concurrency 100% | |
env: | |
CI: true | |
# publish | |
- name: Create release PR and publish packages | |
if: matrix.node-version == '20.x' | |
id: changesets | |
uses: changesets/action@v1.4.5 | |
with: | |
commit: "chore(release): 📦 version packages" | |
title: "chore(release): 📦 version packages" | |
publish: pnpm exec changeset publish | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |