-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (53 loc) · 1.59 KB
/
main_push_packages.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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: [18.x, 20.x]
steps:
- uses: actions/[email protected]
- uses: pnpm/[email protected]
with:
version: 8
- uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
# install
- run: pnpm i --frozen-lockfile
name: Install dependencies
- name: Generate deps 🍪
run: echo "Generate deps 🍪" # instead of pnpm run 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/[email protected]
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 }}