Skip to content

Commit

Permalink
chore(ci): add release config
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxingkang committed Oct 11, 2023
1 parent 7f37e52 commit 23c0a70
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: 'Setup Node.js'
uses: actions/setup-node@v3
with:
node-version: 18

- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- name: Pnpm action
uses: pnpm/action-setup@v2
with:
version: latest
run_install: true

- name: Ts Check
run: pnpm tsc:check

- name: Build
run: pnpm build

- name: Release
run: npx semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 23c0a70

Please sign in to comment.