Skip to content

chore: Improvements #178

chore: Improvements

chore: Improvements #178

Workflow file for this run

name: 'CI'
on:
pull_request:
push:
branches:
- main
jobs:
build-and-unit-test:
name: Build and Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
node-version-file: '.node-version'
- name: Install dependencies
run: |
pnpm install --frozen-lockfile
- name: Run all
run: |
npm run all
use:
name: Use
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
node-version-file: '.node-version'
- uses: ./
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
checkdist:
name: Check dist/index.js
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
node-version-file: '.node-version'
- name: Rebuild the dist/ directory
run: pnpm run build
- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff