46 lines
900 B
YAML
46 lines
900 B
YAML
name: Build and Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
release:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup Node.js environment
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'pnpm'
|
|
|
|
- name: Cache pnpm store
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.pnpm-store
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- name: Install deps
|
|
run: pnpm install
|
|
|
|
- name: Lint
|
|
run: pnpm lint
|
|
|
|
- name: Build
|
|
run: pnpm build
|
|
|
|
- name: Release
|
|
id: release
|
|
run: pnpm release
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|