chore: rebrand RMA to Qryon #44
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Tag to release (e.g., v0.17.0)' | |
| required: true | |
| permissions: | |
| contents: write | |
| packages: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.target }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| use_cross: true | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| steps: | |
| - name: Enable long paths (Windows) | |
| if: runner.os == 'Windows' | |
| run: git config --system core.longpaths true | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| key: cargo-registry-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| cargo-registry-${{ runner.os }}- | |
| - name: Cache cross | |
| if: matrix.use_cross == true | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/bin/cross | |
| key: cross-${{ runner.os }}-v0.2 | |
| - name: Install cross | |
| if: matrix.use_cross == true | |
| run: | | |
| if [ ! -f ~/.cargo/bin/cross ]; then | |
| cargo install cross --git https://github.com/cross-rs/cross | |
| fi | |
| - name: Build (cross) | |
| if: matrix.use_cross == true | |
| run: cross build --release --target ${{ matrix.target }} | |
| - name: Install mold linker (Linux) | |
| if: runner.os == 'Linux' && matrix.use_cross != true | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y mold | |
| mkdir -p ~/.cargo | |
| echo '[target.x86_64-unknown-linux-gnu]' >> ~/.cargo/config.toml | |
| echo 'linker = "clang"' >> ~/.cargo/config.toml | |
| echo 'rustflags = ["-C", "link-arg=-fuse-ld=mold"]' >> ~/.cargo/config.toml | |
| - name: Build (native) | |
| if: matrix.use_cross != true | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Strip binary (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| if command -v strip &> /dev/null; then | |
| strip target/${{ matrix.target }}/release/qryon || true | |
| fi | |
| - name: Package (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| cd target/${{ matrix.target }}/release | |
| tar -czvf ../../../qryon-${{ matrix.target }}.tar.gz qryon | |
| cd ../../.. | |
| - name: Package (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| cd target/${{ matrix.target }}/release | |
| 7z a ../../../qryon-${{ matrix.target }}.zip qryon.exe | |
| cd ../../.. | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: qryon-${{ matrix.target }} | |
| path: qryon-${{ matrix.target }}.* | |
| release: | |
| name: Create Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: artifacts/**/* | |
| generate_release_notes: true | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish-crates: | |
| name: Publish to crates.io | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| 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: cargo-registry-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Strip oxc deps for crates.io publishing | |
| run: | | |
| # oxc_linter and related crates are NOT published to crates.io | |
| # We need to remove them from Cargo.toml for publishing | |
| # Strip from analyzer | |
| cd crates/analyzer | |
| sed -i '/^oxc = \[/,/^\]/d' Cargo.toml | |
| sed -i '/^default = \["oxc"\]/d' Cargo.toml | |
| sed -i '/oxc_linter/d' Cargo.toml | |
| sed -i '/oxc_diagnostics/d' Cargo.toml | |
| sed -i '/oxc_span/d' Cargo.toml | |
| sed -i '/oxc_allocator/d' Cargo.toml | |
| sed -i '/oxc_parser/d' Cargo.toml | |
| sed -i '/oxc_semantic/d' Cargo.toml | |
| sed -i '/oxc_ast/d' Cargo.toml | |
| sed -i '/^\[features\]$/,/^\[/{/^\[features\]$/d;/^$/d}' Cargo.toml | |
| echo "=== Modified analyzer Cargo.toml ===" | |
| cat Cargo.toml | |
| cd ../.. | |
| # Strip oxc feature from CLI (depends on analyzer/oxc) | |
| cd crates/cli | |
| sed -i '/^oxc = \["rma-analyzer\/oxc"\]/d' Cargo.toml | |
| sed -i '/^default = \["oxc"\]/d' Cargo.toml | |
| sed -i '/^\[features\]$/,/^\[/{/^\[features\]$/d;/^$/d}' Cargo.toml | |
| echo "=== Modified cli Cargo.toml ===" | |
| cat Cargo.toml | |
| - name: Publish crates | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: | | |
| # Publish in dependency order (all workspace crates) | |
| # Layer 1: No internal dependencies | |
| cargo publish -p rma-common --allow-dirty || true | |
| sleep 20 | |
| # Layer 2: Depends on rma-common only | |
| cargo publish -p rma-parser --allow-dirty || true | |
| sleep 20 | |
| cargo publish -p rma-rules --allow-dirty || true | |
| sleep 20 | |
| cargo publish -p rma-ai --allow-dirty || true | |
| sleep 20 | |
| cargo publish -p rma-plugins --allow-dirty || true | |
| sleep 20 | |
| # Layer 3: Depends on parser/rules (oxc deps stripped above) | |
| cargo publish -p rma-analyzer --allow-dirty || true | |
| sleep 20 | |
| # Layer 4: Depends on analyzer | |
| cargo publish -p rma-indexer --allow-dirty || true | |
| sleep 20 | |
| cargo publish -p rma-lsp --allow-dirty || true | |
| sleep 20 | |
| # Layer 5: Depends on indexer | |
| cargo publish -p rma-daemon --allow-dirty || true | |
| sleep 20 | |
| # Layer 6: CLI depends on everything | |
| cargo publish -p rma-cli --allow-dirty || true | |
| docker: | |
| name: Build Docker Image | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download Linux amd64 binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: qryon-x86_64-unknown-linux-gnu | |
| path: binaries/amd64 | |
| - name: Download Linux arm64 binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: qryon-aarch64-unknown-linux-gnu | |
| path: binaries/arm64 | |
| - name: Extract binaries | |
| run: | | |
| cd binaries/amd64 && tar -xzf qryon-x86_64-unknown-linux-gnu.tar.gz && cd ../.. | |
| cd binaries/arm64 && tar -xzf qryon-aarch64-unknown-linux-gnu.tar.gz && cd ../.. | |
| chmod +x binaries/amd64/qryon binaries/arm64/qryon | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract version | |
| id: version | |
| run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile.release | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: | | |
| ghcr.io/bumahkib7/qryon:${{ steps.version.outputs.version }} | |
| ghcr.io/bumahkib7/qryon:latest | |
| update-homebrew: | |
| name: Update Homebrew Tap | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Extract tag | |
| id: tag | |
| run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" | |
| - name: Trigger Homebrew tap update | |
| env: | |
| GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} | |
| RELEASE_TAG: ${{ steps.tag.outputs.tag }} | |
| run: | | |
| gh workflow run update-homebrew-tap.yml \ | |
| --repo "${{ github.repository }}" \ | |
| --field "tag=${RELEASE_TAG}" || echo "::warning::Homebrew tap update failed — check HOMEBREW_TAP_TOKEN secret" | |
| publish-npm: | |
| name: Publish to npm | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Extract version | |
| id: version | |
| run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Update npm package version | |
| working-directory: npm | |
| run: | | |
| npm version ${{ steps.version.outputs.version }} --no-git-tag-version --allow-same-version | |
| - name: Publish to npm | |
| working-directory: npm | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |