Skip to content

Commit

Permalink
added github action
Browse files Browse the repository at this point in the history
  • Loading branch information
sujjeee committed Dec 17, 2023
1 parent 6abfe1f commit c7281c6
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Code check and Publish

on:
pull_request:
branches: ["*"]
push:
branches: ["main"]

jobs:
quality:
runs-on: ubuntu-latest
name: Quality Check
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Biome
uses: biomejs/setup-biome@v1
with:
version: 1.4.1

- name: Run Biome
run: biome ci .

publish:
needs: quality
runs-on: ubuntu-latest
name: Publish
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 8.11.0
run_install: false

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

- name: publish package
run: pnpm pub:release
env:
NODE_AUTH_TOKEN: ${{secrets.DUB_AUTH_TOKEN}}

0 comments on commit c7281c6

Please sign in to comment.