Skip to content

Commit

Permalink
chore(github-actions): added PR and release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyxguo committed Jul 2, 2023
1 parent 162df85 commit 8b37960
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: PR Check

permissions:
pull-requests: write
contents: write

on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
pr-build-check:
name: PR Build Check
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

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

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Install semantic-release extra plugins
run: pnpm install --save-dev @semantic-release/changelog @semantic-release/git

- name: Build
run: pnpm build

Expand Down

0 comments on commit 8b37960

Please sign in to comment.