Verify Store packages against pinned Ed25519 keys and catalog metadata, persist installation provenance, and add Marketplace review and installation UI while preserving unsigned local packages. Bundle standalone plugin authoring tools and add a six-platform CLI packaging workflow. Official key initialization and protected signing environment setup remain separate rollout steps.
93 lines
2.9 KiB
YAML
93 lines
2.9 KiB
YAML
name: Build plugin CLI
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
publish:
|
|
description: Publish assembled CLI to npm
|
|
type: boolean
|
|
default: false
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
native:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- {
|
|
runner: windows-latest,
|
|
platform: windows-x86_64,
|
|
extension: .exe,
|
|
}
|
|
- {
|
|
runner: windows-11-arm,
|
|
platform: windows-aarch64,
|
|
extension: .exe,
|
|
}
|
|
- { runner: ubuntu-22.04, platform: linux-x86_64, extension: "" }
|
|
- { runner: ubuntu-24.04-arm, platform: linux-aarch64, extension: "" }
|
|
- { runner: macos-15-intel, platform: macos-x86_64, extension: "" }
|
|
- { runner: macos-14, platform: macos-aarch64, extension: "" }
|
|
runs-on: ${{ matrix.runner }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@1.94.0
|
|
- run: cargo build --locked --release --manifest-path src-tauri/crates/nyaterm-plugin-runtime/Cargo.toml --bin nyaterm-plugin
|
|
- name: Name platform binary
|
|
shell: bash
|
|
env:
|
|
PLATFORM: ${{ matrix.platform }}
|
|
EXT: ${{ matrix.extension }}
|
|
run: |
|
|
mkdir -p plugins/cli/native
|
|
cp "src-tauri/crates/nyaterm-plugin-runtime/target/release/nyaterm-plugin$EXT" "plugins/cli/native/nyaterm-plugin-$PLATFORM$EXT"
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: cli-${{ matrix.platform }}
|
|
path: plugins/cli/native/*
|
|
assemble:
|
|
needs: native
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
pattern: cli-*
|
|
path: plugins/cli/native
|
|
merge-multiple: true
|
|
- run: npm pack ./plugins/cli
|
|
env:
|
|
NYATERM_CLI_RELEASE: "1"
|
|
- name: Verify standalone package
|
|
run: |
|
|
npm install -g ./nyaterm-plugin-cli-*.tgz
|
|
nyaterm-plugin create example.smoke work/plugin
|
|
nyaterm-plugin pack work/plugin work/smoke.nyap
|
|
nyaterm-plugin inspect work/smoke.nyap
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: npm-plugin-cli
|
|
path: nyaterm-plugin-cli-*.tgz
|
|
publish:
|
|
if: inputs.publish && github.ref == 'refs/heads/main'
|
|
needs: assemble
|
|
runs-on: ubuntu-latest
|
|
environment: plugin-cli-publishing
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
steps:
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
registry-url: https://registry.npmjs.org
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: npm-plugin-cli
|
|
- run: npm publish ./nyaterm-plugin-cli-*.tgz --access public --provenance
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|