feat(ui): 迁移 UI 2.0 并重组来源、扩展与 Graph 界面 #21
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: Native Extension release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: native-extension-release-main | |
| cancel-in-progress: false | |
| jobs: | |
| reconcile: | |
| name: Reconcile Extension release plan | |
| permissions: | |
| contents: write | |
| packages: read | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| outputs: | |
| has_changesets: ${{ steps.changesets.outputs.has-changesets }} | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install the pinned pnpm release | |
| uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | |
| with: | |
| version: 11.11.0 | |
| - name: Set up Node | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: package.json | |
| cache: pnpm | |
| registry-url: https://npm.pkg.github.com | |
| scope: '@inkcre' | |
| - name: Install the frozen workspace | |
| run: pnpm install --frozen-lockfile | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create or update the Extension Version PR | |
| id: changesets | |
| uses: changesets/action@8488615a623b1b9c987934bb89eae8af6a946ac1 # v2.1.1 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| version-script: pnpm release:version | |
| pr-title: 'chore(extensions): version pending releases' | |
| commit-message: 'chore(extensions): version pending releases' | |
| pr-base-branch: main | |
| create-github-releases: false | |
| push-git-tags: false | |
| publish: | |
| name: Build and publish native Extensions | |
| needs: reconcile | |
| if: needs.reconcile.outputs.has_changesets == 'false' | |
| permissions: | |
| contents: read | |
| packages: read | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| environment: | |
| name: production | |
| steps: | |
| - name: Checkout the release revision | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: ${{ github.sha }} | |
| fetch-depth: 1 | |
| persist-credentials: false | |
| - name: Install the pinned pnpm release | |
| uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | |
| with: | |
| version: 11.11.0 | |
| - name: Set up Node for release | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: package.json | |
| cache: pnpm | |
| registry-url: https://npm.pkg.github.com | |
| scope: '@inkcre' | |
| - name: Install the frozen release workspace | |
| run: pnpm install --frozen-lockfile | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build native Extension release artifacts | |
| run: | | |
| pnpm --filter @inkcre/core build | |
| pnpm --filter './extensions/*' build | |
| - name: Publish missing native Extension Releases | |
| env: | |
| INKCRE_EXTENSION_REGISTRY_URL: >- | |
| ${{ vars.INKCRE_EXTENSION_REGISTRY_URL || 'https://registry.inkcre.dev' }} | |
| INKCRE_EXTENSION_REGISTRY_TOKEN: ${{ secrets.INKCRE_EXTENSION_REGISTRY_TOKEN }} | |
| SOURCE_REPOSITORY: https://github.com/${{ github.repository }} | |
| SOURCE_REVISION: ${{ github.sha }} | |
| run: bash scripts/publish-native-extensions.sh |