Skip to content

ci: missing '

ci: missing ' #26

Workflow file for this run

name: "Deploy: CI"
on:
push:
branches: [ 'main', 'develop' ]
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
jobs:
Test:
runs-on: ubuntu-latest
outputs:
src: ${{ steps.filter.outputs.src }}
test: ${{ steps.filter.outputs.test }}
strategy:
matrix:
node-version: [ 20.x, 'lts/*' ]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dorny/[email protected]
id: filter
with:
filters: |
src:
- 'src/**'
test:
- '__tests__/**'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
if: steps.filter.outputs.src == 'true' || steps.filter.outputs.test == 'true'
run: npm install --ignore-scripts
- name: Run Lint
if: steps.filter.outputs.src == 'true'
run: npm run lint
- name: Run Unit Tests
if: steps.filter.outputs.test == 'true'
run: npm run test
Release:
runs-on: ubuntu-latest
needs: [ 'Test' ]
steps:
- uses: actions/checkout@v4
if: ${{ needs.Test.outputs.src == 'true' }}
with:
persist-credentials: false
- name: Use Node.js
if: ${{ needs.Test.outputs.src == 'true' }}
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: NPM Install
if: ${{ needs.Test.outputs.src == 'true' }}
run: npm install --ignore-scripts
- name: Semantic Release (Dry Run)
if: ${{ needs.Test.outputs.src == 'true' }}
run: npm run semantic-release:dry-run
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Semantic Release
if: ${{ needs.Test.outputs.src == 'true' }}
run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Merge:
runs-on: ubuntu-latest
needs: [ 'Release' ]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
ref: main
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Bugs5382"
- name: Merge main into develop
run: |
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}
git fetch origin
git checkout develop
git merge origin/main -m "chore(ci): merge main into develop [ci skip]"
git push origin develop
Docs:
runs-on: ubuntu-latest
needs: [ 'Release' ]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
ref: main
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: NPM Install
run: npm install --ignore-scripts
- name: Generate Typedoc documentation
run: npm run typedoc
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./docs
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'