-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.49 KB
/
release.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
name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions: {} # reset
jobs:
release:
name: Release
# IMPORTANT: prevent this action from running on forks
if: github.repository == 'fellipeutaka/kanpeki'
permissions:
contents: write # to create release (changesets/action)
pull-requests: write # to create pull request (changesets/action)
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.12.2] # Same as the version in .nvmrc
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v3
with:
version: 9.5.0 # Same as the version in package.json
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Build the CLI
run: pnpm run build --filter=kanpeki-ui
- name: Create Version PR or Publish to NPM
id: changesets
uses: changesets/action@v1
with:
commit: "chore(release): version packages"
title: "chore(release): version packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}