Skip to content

Initial implementation #16

Initial implementation

Initial implementation #16

Workflow file for this run

name: actions
on:
pull_request:
branches:
- main
push:
branches:
- main
release:
types:
- published
jobs:
test:
name: test on Node.js v${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 22
timeout-minutes: 10
env:
SERVER_ENV: development
PROTOCOL_AND_HOST: "http://localhost:3000"
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_DATABASE_ID: ${{ secrets.CLOUDFLARE_DATABASE_ID }}
CLOUDFLARE_D1_TOKEN: ${{ secrets.CLOUDFLARE_D1_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Use Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: pnpm install
- run: pnpm run build
# TODO
# - run: pnpm test
lint:
runs-on: ubuntu-latest
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_DATABASE_ID: ${{ secrets.CLOUDFLARE_DATABASE_ID }}
CLOUDFLARE_D1_TOKEN: ${{ secrets.CLOUDFLARE_D1_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Use Node.js v22
uses: actions/setup-node@v4
with:
node-version: 22
- run: pnpm install
- run: pnpm run build
- run: pnpm run lint
release:
needs:
- test
- lint
# if: github.event_name == 'release'
runs-on: ubuntu-latest
env:
SERVER_ENV: production
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: pnpm install
- run: pnpm run build
- run: pnpm run release