This commit is contained in:
2025-08-25 20:24:23 +08:00
parent 30106e0129
commit 0ae8d7a709
1044 changed files with 321581 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
name: Create release
on:
create
jobs:
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/decap-cms@')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get semver number
id: get_semver
env:
TAG_NAME: ${{ github.ref }}
run: echo "::set-output name=pkg::${TAG_NAME:10}"
- name: Create release on GitHub API
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.get_semver.outputs.pkg }}
body: |
:scroll: [Changelog](https://github.com/${{ github.repository }}/blob/${{ steps.get_semver.outputs.pkg }}/CHANGELOG.md)
draft: false
prerelease: false

View File

@@ -0,0 +1,30 @@
name: Label PR
on:
pull_request:
types: [opened, edited]
jobs:
label-pr:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
runs-on: ubuntu-latest
steps:
- uses: netlify/pr-labeler-action@v1.0.0
if: startsWith(github.event.pull_request.title, 'fix')
with:
token: '${{ secrets.GITHUB_TOKEN }}'
label: 'type: bug'
- uses: netlify/pr-labeler-action@v1.0.0
if: startsWith(github.event.pull_request.title, 'chore')
with:
token: '${{ secrets.GITHUB_TOKEN }}'
label: 'type: chore'
- uses: netlify/pr-labeler-action@v1.0.0
if: startsWith(github.event.pull_request.title, 'feat')
with:
token: '${{ secrets.GITHUB_TOKEN }}'
label: 'type: feature'
- uses: netlify/pr-labeler-action@v1.0.0
if: startsWith(github.event.pull_request.title, 'security')
with:
token: '${{ secrets.GITHUB_TOKEN }}'
label: 'type: security'

View File

@@ -0,0 +1,62 @@
name: Node CI
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
changes:
runs-on: ubuntu-latest
outputs:
cms: ${{ steps.filter.outputs.cms }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
cms:
- '!website/**'
build:
needs: changes
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
node-version: [20.x, 22.x]
fail-fast: true
if: ${{ needs.changes.outputs.cms == 'true' }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
check-latest: true
cache: 'npm'
- name: log versions
run: node --version && npm --version && yarn --version
- name: install dependencies
run: npm ci
- name: run unit tests
run: npm run test:ci
- name: build demo site
run: npm run build:demo
- name: run e2e tests
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x'
run: npm run test:e2e:run-ci
env:
IS_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true || github.repository_owner != 'decaporg' }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
NODE_OPTIONS: --max-old-space-size=4096
TZ: Europe/Amsterdam
- uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '22.x' && failure()
with:
name: cypress-results
path: |
cypress/screenshots
cypress/videos