Skip to content

Add name check

Add name check #272

Workflow file for this run

name: wrangler
on:
pull_request:
branches:
- main
push:
branches:
- main
env:
WRANGLER_SEND_METRICS: "false"
jobs:
wrangler:
runs-on: ubuntu-latest
name: ${{github.event_name == 'push' && 'publish' || 'build'}}
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
- name: Install
run: npm ci
- name: Publish worker
if: github.event_name == 'push'
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
wranglerVersion: '2.10.0'
command: publish
- name: Build worker
if: github.event_name != 'push'
uses: cloudflare/[email protected]
with:
apiToken: "pull_request"
wranglerVersion: '2.10.0'
command: build
- name: Publish worker (dry-run)
if: github.event_name != 'push'
uses: cloudflare/[email protected]
with:
apiToken: "pull_request"
wranglerVersion: '2.10.0'
command: publish --dry-run=true