chore: use union merge driver for CHANGELOG.adoc #4032
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build core | |
| on: | |
| workflow_call: | |
| inputs: | |
| ref: | |
| description: 'Git ref to check out and build (defaults to the ref that triggered the workflow)' | |
| required: false | |
| type: string | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - 'main' | |
| tags-ignore: | |
| - '**' | |
| paths-ignore: | |
| - 'docs/**' | |
| pull_request: | |
| paths-ignore: | |
| - 'docs/**' | |
| jobs: | |
| activate: | |
| if: | | |
| (github.event_name == 'workflow_call') || | |
| (github.event_name == 'schedule' && github.repository_owner == 'asciidoctor') || | |
| (github.event_name != 'schedule' && !endsWith(github.event.head_commit.message, '[skip ci]')) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Proceed | |
| run: echo ok go | |
| build: | |
| needs: activate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ inputs.ref }} | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check and build | |
| run: | | |
| npm run check -w @asciidoctor/core | |
| npm run build -w @asciidoctor/core | |
| - name: Check types | |
| run: npm run test:types -w @asciidoctor/core | |
| - name: Validate documentation | |
| run: npm run docs -w @asciidoctor/core | |
| - name: Check no uncommitted changes after build | |
| run: git diff --exit-code | |
| test: | |
| needs: build | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-15] | |
| node-version: [22, 24] | |
| exclude: | |
| - os: windows-latest | |
| node-version: 24 | |
| - os: macos-15 | |
| node-version: 24 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ inputs.ref }} | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| npx playwright install chromium | |
| - name: Test | |
| shell: bash | |
| run: | | |
| npm test | |
| npm run test:browser -w @asciidoctor/core | |
| test-deno: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ inputs.ref }} | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - name: Set up Deno | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| cache: true | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Test (Deno) | |
| run: | | |
| npm run test:deno -w @asciidoctor/core | |
| npm run test:deno -w asciidoctor | |
| native_images: | |
| needs: [test, test-deno] | |
| uses: ./.github/workflows/native-image.yml | |
| with: | |
| ref: ${{ inputs.ref }} | |
| docs: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'asciidoctor' | |
| needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| - name: Generate API documentation | |
| run: | | |
| npm run docs -w @asciidoctor/core | |
| npm run docs -w asciidoctor | |
| cp -r packages/asciidoctor/build/docs packages/core/build/docs/cli | |
| - name: Publish to gh-pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: packages/core/build/docs | |
| target-folder: main |