Skip to content

Commit

Permalink
Simplify npm publish workflow; add lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoshino committed May 18, 2023
1 parent ffd59f8 commit 3762b32
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 13 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint

on: push

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout the branch
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Run all lint checks
run: pnpm lint
18 changes: 5 additions & 13 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,16 @@ jobs:
steps:
- name: Checkout the branch
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Get pnpm store directory
id: pnpm-cache
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-
node-version-file: .nvmrc
cache: pnpm
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: pnpm install
- name: Build & publish the app
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18

0 comments on commit 3762b32

Please sign in to comment.