-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
993fc83
commit 78098bb
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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/kenji' | ||
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 }} |