Add boilerplate #7
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
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| # SPDX-FileCopyrightText: 2026 Kaito Udagawa <umireon@kaito.tokyo> | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Plugin CI | |
| # file: .github/workflows/plugin.yml | |
| # author: Kaito Udagawa <umireon@kaito.tokyo> | |
| # date: 2026-05-08 | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| tags: ['*'] | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| config: | |
| permissions: {} | |
| outputs: | |
| VCPKG_BINARY_SOURCES: ${{ steps.config.outputs.VCPKG_BINARY_SOURCES }} | |
| VCPKG_VERSION: ${{ steps.config.outputs.VCPKG_VERSION }} | |
| runs-on: ubuntu-slim | |
| steps: | |
| - id: config | |
| shell: bash --noprofile --norc -euo pipefail -O nullglob {0} | |
| run: | | |
| echo 'VCPKG_BINARY_SOURCES=clear;http,https://vcpkg-obs.kaito.tokyo/{name}/{version}/{sha},read' >> "${GITHUB_OUTPUT}" | |
| echo 'VCPKG_VERSION=2025.08.27' >> "${GITHUB_OUTPUT}" | |
| build-windows: | |
| needs: config | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/plugin-build-windows.yml | |
| with: | |
| environment: ${{ github.event_name == 'push' && 'production-windows' || '' }} | |
| VCPKG_BINARY_SOURCES: ${{ needs.config.outputs.VCPKG_BINARY_SOURCES }} | |
| vcpkg-version: ${{ needs.config.outputs.VCPKG_VERSION }} | |
| build-macos: | |
| needs: config | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/plugin-build-macos.yml | |
| with: | |
| environment: ${{ github.event_name == 'push' && 'production-macos' || '' }} | |
| VCPKG_BINARY_SOURCES: ${{ needs.config.outputs.VCPKG_BINARY_SOURCES }} | |
| vcpkg-version: ${{ needs.config.outputs.VCPKG_VERSION }} | |
| codesign-enabled: ${{ github.event_name == 'push' }} | |
| secrets: inherit | |
| build-ubuntu: | |
| needs: config | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/plugin-build-ubuntu.yml | |
| with: | |
| environment: ${{ github.event_name == 'push' && 'production-ubuntu' || '' }} | |
| VCPKG_BINARY_SOURCES: ${{ needs.config.outputs.VCPKG_BINARY_SOURCES }} | |
| vcpkg-version: ${{ needs.config.outputs.VCPKG_VERSION }} | |
| accept-plugin: | |
| name: Accept Plugin CI | |
| needs: [build-windows, build-macos, build-ubuntu] | |
| runs-on: ubuntu-slim | |
| permissions: {} | |
| steps: | |
| - name: Accept plugin | |
| run: | | |
| echo 'The workflow Plugin CI has completed successfully.' | |
| create-release: | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
| needs: [build-windows, build-macos, build-ubuntu] | |
| permissions: | |
| artifact-metadata: write | |
| attestations: write | |
| contents: write | |
| id-token: write | |
| uses: ./.github/workflows/plugin-release.yml | |
| with: | |
| environment: production-release |