Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/actions/setup-pnpm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json

name: 'Restore pnpm cache'
description: 'Sets up Node and pnpm, restores node_modules and ~/.cache/ from cache (no install)'
inputs:
node-version:
description: 'Version of Node'
required: false
default: '24'
runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d #v6.0.5
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0
with:
node-version: ${{ inputs.node-version }}
- uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
with:
path: |
node_modules
~/.cache/
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
13 changes: 4 additions & 9 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,17 @@ concurrency:
cancel-in-progress: true

jobs:
setup:
uses: ./.github/workflows/setup.yml
check-dist:
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: andykenward/github-actions/setup-pnpm@4975fa85f6e689743962bbb5dbac847aaa843edb #v3.0.1
with:
node-version: 24
- name: Cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
with:
path: |
~/.cache/
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml', '**/.oxlintrc.json', '**/.oxfmtrc.json', '**/tsconfig.json', '**/knip.json', '**/vitest.config.ts', '**/vitest.setup.ts') }}
- uses: ./.github/actions/setup-pnpm
- name: Rebuild the dist/ directory
run: pnpm run build

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-delete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
concurrency:
group: deploy-delete-${{ github.head_ref || github.run_id }}

permissions: {}

jobs:
deploy-delete:
permissions:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

permissions: {}

jobs:
deploy-main:
permissions:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

permissions: {}

jobs:
deploy:
if: ${{ !github.event.pull_request.head.repo.fork }}
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ on:

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions: {}

jobs:
release:
name: Release
if: ${{ github.repository == 'andykenward/github-actions-cloudflare-pages' && github.event.workflow_run.conclusion == 'success' }}
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -28,15 +30,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: andykenward/github-actions/setup-pnpm@4975fa85f6e689743962bbb5dbac847aaa843edb #v3.0.1
with:
node-version: 24
- name: Cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
with:
path: |
~/.cache/
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml', '**/.oxlintrc.json', '**/.oxfmtrc.json', '**/tsconfig.json', '**/knip.json', '**/vitest.config.ts', '**/vitest.setup.ts') }}
- uses: ./.github/actions/setup-pnpm
- name: Create Release Pull Request
id: changesets
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf #v1.7.0
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: setup

on:
workflow_call:

jobs:
setup:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- name: Cache
id: cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
with:
path: |
node_modules
~/.cache/
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
- if: steps.cache.outputs.cache-hit != 'true'
uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d #v6.0.5
- if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0
with:
node-version: 24
cache: pnpm
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pnpm install
18 changes: 14 additions & 4 deletions .github/workflows/sync-readme-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,21 @@ on:
- 'v*'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions: {}

jobs:
setup:
if: ${{ github.repository == 'andykenward/github-actions-cloudflare-pages' }}
permissions:
contents: read
uses: ./.github/workflows/setup.yml
sync:
needs: setup
name: Sync action version references
if: ${{ github.repository == 'andykenward/github-actions-cloudflare-pages' }}
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -21,9 +32,8 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
ref: main
- uses: andykenward/github-actions/setup-pnpm@4975fa85f6e689743962bbb5dbac847aaa843edb #v3.0.1
with:
node-version: 24
persist-credentials: false
- uses: ./.github/actions/setup-pnpm
- name: Sync action version references
run: pnpm run sync:readme
env:
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,17 @@ concurrency:
cancel-in-progress: true

jobs:
setup:
uses: ./.github/workflows/setup.yml
test:
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: andykenward/github-actions/setup-pnpm@4975fa85f6e689743962bbb5dbac847aaa843edb #v3.0.1
with:
node-version: 24
- name: Cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
with:
path: |
~/.cache/
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml', '**/.oxlintrc.json', '**/.oxfmtrc.json', '**/tsconfig.json', '**/knip.json', '**/vitest.config.ts', '**/vitest.setup.ts') }}
- uses: ./.github/actions/setup-pnpm
- name: Lint
run: pnpm run lint --format=github
- name: Typecheck
Expand Down
28 changes: 10 additions & 18 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

permissions: {}

jobs:
setup:
permissions:
contents: read
uses: ./.github/workflows/setup.yml
download:
needs: setup
permissions:
contents: write
pull-requests: write
Expand All @@ -20,15 +27,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: andykenward/github-actions/setup-pnpm@4975fa85f6e689743962bbb5dbac847aaa843edb #v3.0.1
with:
node-version: 24
- name: Cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
with:
path: |
~/.cache/
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml', '**/.oxlintrc.json', '**/.oxfmtrc.json', '**/tsconfig.json', '**/knip.json', '**/vitest.config.ts', '**/vitest.setup.ts') }}
- uses: ./.github/actions/setup-pnpm
- name: cli download payloads
run: pnpm run download
env:
Expand All @@ -46,6 +45,7 @@ jobs:
body: |
This is an automated PR to update payloads.
types:
needs: setup
permissions:
contents: write
pull-requests: write
Expand All @@ -55,15 +55,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: andykenward/github-actions/setup-pnpm@4975fa85f6e689743962bbb5dbac847aaa843edb #v3.0.1
with:
node-version: 24
- name: Cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
with:
path: |
~/.cache/
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml', '**/.oxlintrc.json', '**/.oxfmtrc.json', '**/tsconfig.json', '**/knip.json', '**/vitest.config.ts', '**/vitest.setup.ts') }}
- uses: ./.github/actions/setup-pnpm
- name: cli all
run: pnpm run tsc:types
- name: Create Pull Request
Expand Down