v0.1.14 #19
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: | |
| release: | |
| types: [published] | |
| push: | |
| tags: ['v*'] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| # Build standalone binaries for all platforms (Tier 1 requirement) | |
| build-binaries: | |
| strategy: | |
| matrix: | |
| include: | |
| # Linux builds (statically linked with musl) | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-musl | |
| artifact_name: dprs-linux-x64 | |
| - os: ubuntu-latest | |
| target: aarch64-unknown-linux-musl | |
| artifact_name: dprs-linux-arm64 | |
| # macOS builds | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| artifact_name: dprs-macos-intel | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| artifact_name: dprs-macos-arm64 | |
| # Windows builds | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| artifact_name: dprs-windows-x64.exe | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install Zig | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: goto-bus-stop/setup-zig@v2 | |
| with: | |
| version: 0.13.0 | |
| - name: Install cargo-zigbuild | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo install --locked cargo-zigbuild | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-${{ matrix.target }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-${{ matrix.target }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-${{ matrix.target }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Build release binary | |
| run: | | |
| if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then | |
| cargo zigbuild --release --target ${{ matrix.target }} | |
| else | |
| cargo build --release --target ${{ matrix.target }} | |
| fi | |
| shell: bash | |
| - name: Package binaries | |
| run: | | |
| mkdir -p release | |
| if [ "${{ matrix.os }}" = "windows-latest" ]; then | |
| cp target/${{ matrix.target }}/release/dprs.exe release/${{ matrix.artifact_name }} | |
| cp target/${{ matrix.target }}/release/dplw.exe release/dplw-windows-x64.exe | |
| else | |
| cp target/${{ matrix.target }}/release/dprs release/${{ matrix.artifact_name }} | |
| cp target/${{ matrix.target }}/release/dplw release/dplw-${{ matrix.target }} | |
| chmod +x release/* | |
| fi | |
| shell: bash | |
| - name: Generate checksums | |
| run: | | |
| cd release | |
| if [ "${{ matrix.os }}" = "windows-latest" ]; then | |
| certutil -hashfile ${{ matrix.artifact_name }} SHA256 > ${{ matrix.artifact_name }}.sha256 | |
| else | |
| shasum -a 256 ${{ matrix.artifact_name }} > ${{ matrix.artifact_name }}.sha256 | |
| shasum -a 256 dplw-* > dplw-${{ matrix.target }}.sha256 | |
| fi | |
| shell: bash | |
| - name: Upload binary artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: binary-${{ matrix.target }} | |
| path: release/* | |
| # Build Linux distribution packages | |
| build-deb: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-unknown-linux-musl | |
| - name: Install Zig | |
| uses: goto-bus-stop/setup-zig@v2 | |
| with: | |
| version: 0.13.0 | |
| - name: Install cargo-zigbuild | |
| run: cargo install --locked cargo-zigbuild | |
| - name: Install cargo-deb | |
| run: cargo install cargo-deb | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-musl-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Build static binary with musl | |
| run: cargo zigbuild --release --target x86_64-unknown-linux-musl | |
| - name: Build deb package | |
| run: cargo deb --target x86_64-unknown-linux-musl --no-build | |
| - name: Upload deb artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: deb-package | |
| path: target/x86_64-unknown-linux-musl/debian/*.deb | |
| build-rpm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-unknown-linux-musl | |
| - name: Install Zig | |
| uses: goto-bus-stop/setup-zig@v2 | |
| with: | |
| version: 0.13.0 | |
| - name: Install cargo-zigbuild | |
| run: cargo install --locked cargo-zigbuild | |
| - name: Install cargo-generate-rpm | |
| run: cargo install cargo-generate-rpm | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo build | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-musl-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Build static binary with musl | |
| run: cargo zigbuild --release --target x86_64-unknown-linux-musl | |
| - name: Build rpm package | |
| run: cargo generate-rpm --target x86_64-unknown-linux-musl | |
| - name: Upload rpm artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rpm-package | |
| path: target/x86_64-unknown-linux-musl/generate-rpm/*.rpm | |
| # Publish to crates.io (Tier 1 language-specific package manager) | |
| publish-crates: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Publish to crates.io | |
| run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| continue-on-error: true # May already be published | |
| # Create GitHub Release with all artifacts | |
| release: | |
| needs: [build-binaries, build-deb, build-rpm, publish-crates] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all binary artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: binary-* | |
| path: artifacts/binaries | |
| merge-multiple: true | |
| - name: Download deb artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: deb-package | |
| path: artifacts/ | |
| - name: Download rpm artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: rpm-package | |
| path: artifacts/ | |
| - name: Create consolidated checksums | |
| run: | | |
| cd artifacts | |
| find . -type f \( -name "dprs-*" -o -name "dplw-*" -o -name "*.deb" -o -name "*.rpm" \) -not -name "*.sha256" -exec shasum -a 256 {} \; > SHA256SUMS | |
| cat SHA256SUMS | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| artifacts/binaries/* | |
| artifacts/*.deb | |
| artifacts/*.rpm | |
| artifacts/SHA256SUMS | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| body: | | |
| ## Installation | |
| ### Quick Start | |
| **macOS/Linux (Homebrew)** - *Coming soon in Tier 2* | |
| ```bash | |
| brew install dprs | |
| ``` | |
| **Windows (winget)** - *Coming soon in Tier 2* | |
| ```bash | |
| winget install dprs | |
| ``` | |
| ### Standalone Binaries | |
| Download the appropriate binary for your platform from the Assets below: | |
| - **Linux x64**: `dprs-linux-x64` | |
| - **Linux ARM64**: `dprs-linux-arm64` | |
| - **macOS Intel**: `dprs-macos-intel` | |
| - **macOS Apple Silicon**: `dprs-macos-arm64` | |
| - **Windows x64**: `dprs-windows-x64.exe` | |
| **Installation**: | |
| ```bash | |
| # Linux/macOS | |
| chmod +x dprs-* | |
| sudo mv dprs-* /usr/local/bin/dprs | |
| # Windows: Move dprs-windows-x64.exe to a directory in your PATH | |
| ``` | |
| **Verification**: | |
| ```bash | |
| dprs --version | |
| ``` | |
| ### Package Managers | |
| **Rust/Cargo**: | |
| ```bash | |
| cargo install dprs | |
| ``` | |
| **Debian/Ubuntu**: | |
| ```bash | |
| wget https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/dprs_*.deb | |
| sudo dpkg -i dprs_*.deb | |
| ``` | |
| **Fedora/RHEL**: | |
| ```bash | |
| wget https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/dprs-*.rpm | |
| sudo rpm -i dprs-*.rpm | |
| ``` | |
| ### Docker | |
| **Multi-architecture support** (amd64, arm64): | |
| ```bash | |
| docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | |
| docker run --rm ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} dprs --version | |
| ``` | |
| ### Checksums | |
| Verify your download integrity using `SHA256SUMS`. | |
| --- | |
| π¦ **Distribution Tier**: Currently at **Tier 1** (Launch Phase) | |
| - β Standalone binaries for all major platforms | |
| - β Cargo/crates.io package manager | |
| - β Docker multi-arch images | |
| - β Debian/Ubuntu packages | |
| - β Fedora/RHEL packages | |
| π **Coming in Tier 2** (Growth Phase): | |
| - Homebrew formula (macOS/Linux) | |
| - winget package (Windows) | |
| - Self-update mechanism | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |