Skip to content

chore(deps): update dependency node to v18.18.1 #54

chore(deps): update dependency node to v18.18.1

chore(deps): update dependency node to v18.18.1 #54

name: Build and publish
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
repository_dispatch:
jobs:
build:
name: Test build
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Set up node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Test worker build
uses: cloudflare/wrangler-action@4b3eae832ab5113c67958be31ca062ad46c593b6 # v3.3.1
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
publish: false
publish:
name: Publish
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Set up node
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Publish to Worker
uses: cloudflare/wrangler-action@4b3eae832ab5113c67958be31ca062ad46c593b6 # v3.3.1
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}