Skip to content

Commit

Permalink
Updated CI & publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
NuroDev committed Jun 6, 2023
1 parent 7f42194 commit 7c3ffcc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 27 deletions.
32 changes: 9 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ on:

env:
LEMON_SQUEEZY_API_KEY: ${{ secrets.LEMON_SQUEEZY_API_KEY }}
PNPM_VERSION: 8.5.1

jobs:
build:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [18.x, 20.x]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -26,31 +27,16 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: yarn install

- name: Build
run: yarn build

test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
node-version: ${{ matrix.node-version }}
version: ${{ env.PNPM_VERSION }}

- name: Install
run: yarn install
run: pnpm install

- name: Build
run: yarn build:prod
run: pnpm run build:prod

- name: Test
run: yarn test
run: pnpm run test
14 changes: 10 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

env:
LEMON_SQUEEZY_API_KEY: ${{ secrets.LEMON_SQUEEZY_API_KEY }}
PNPM_VERSION: 8.5.1

jobs:
publish:
Expand All @@ -15,19 +16,24 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js 16.x
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 16.x
node-version: 18.x

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: ${{ env.PNPM_VERSION }}

- name: Install Dependencies
run: yarn install
run: pnpm install

- name: Build
run: yarn build:prod

- name: Test
run: yarn test
run: pnpm run test

- name: Publish
uses: JS-DevTools/npm-publish@v1
Expand Down

0 comments on commit 7c3ffcc

Please sign in to comment.