feat: full CLI parity — all subcommands, click UX, shell completions #15
Workflow file for this run
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: Publish | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: Build (all crates) | |
| run: cargo build --workspace --release | |
| - name: Test (all crates) | |
| run: cargo test --workspace | |
| publish-crates: | |
| name: Publish to crates.io | |
| needs: test | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_PUBLISH_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| key: ${{ runner.os }}-cargo-publish-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| # Publish in dependency order — each layer waits for previous to index. | |
| - name: Publish devsper-core | |
| run: cargo publish -p devsper-core --no-verify || true | |
| - run: sleep 20 | |
| - name: Publish devsper-graph | |
| run: cargo publish -p devsper-graph --no-verify || true | |
| - name: Publish devsper-bus | |
| run: cargo publish -p devsper-bus --no-verify || true | |
| - run: sleep 20 | |
| - name: Publish devsper-scheduler | |
| run: cargo publish -p devsper-scheduler --no-verify || true | |
| - name: Publish devsper-executor | |
| run: cargo publish -p devsper-executor --no-verify || true | |
| - name: Publish devsper-plugins | |
| run: cargo publish -p devsper-plugins --no-verify || true | |
| - name: Publish devsper-providers | |
| run: cargo publish -p devsper-providers --no-verify || true | |
| - name: Publish devsper-memory | |
| run: cargo publish -p devsper-memory --no-verify || true | |
| - run: sleep 20 | |
| - name: Publish devsper-compiler | |
| run: cargo publish -p devsper-compiler --no-verify || true | |
| - name: Publish devsper-cluster | |
| run: cargo publish -p devsper-cluster --no-verify || true | |
| - run: sleep 20 | |
| - name: Publish devsper-bin | |
| run: cargo publish -p devsper-bin --no-verify || true | |
| build-wheels: | |
| name: Build wheels (${{ matrix.target }}) | |
| needs: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --release --out dist | |
| working-directory: python | |
| manylinux: auto | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.target }} | |
| path: python/dist/ | |
| publish-pypi: | |
| name: Publish to PyPI | |
| needs: build-wheels | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/devsper/ | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: wheels-* | |
| merge-multiple: true | |
| path: dist/ | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist/ | |
| build-binaries: | |
| name: Build CLI binary (${{ matrix.target }}) | |
| needs: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| binary: devsper | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| binary: devsper | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| binary: devsper | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| binary: devsper.exe | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Build CLI binary | |
| run: cargo build -p devsper-bin --release --target ${{ matrix.target }} | |
| - name: Package binary | |
| shell: bash | |
| run: | | |
| mkdir -p dist | |
| cp target/${{ matrix.target }}/release/${{ matrix.binary }} dist/devsper-${{ matrix.target }}${{ matrix.target == 'x86_64-pc-windows-msvc' && '.exe' || '' }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: binary-${{ matrix.target }} | |
| path: dist/ | |
| create-release: | |
| name: Create GitHub Release | |
| needs: [publish-pypi, build-binaries] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: binary-* | |
| merge-multiple: true | |
| path: release-assets/ | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: wheels-* | |
| merge-multiple: true | |
| path: release-assets/ | |
| - name: Create release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release create ${{ github.ref_name }} \ | |
| --title "${{ github.ref_name }}" \ | |
| --generate-notes \ | |
| release-assets/* |