diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a15256a9..bed01e19 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,12 +38,18 @@ jobs: - name: Setup Zig uses: goto-bus-stop/setup-zig@v2 - - name: Build Linux Release for ${{ steps.get_binary_version.outputs.BIN_NAME }} + - name: Build Linux Release for ${{ steps.get_binary_version.outputs.BIN_NAME }} And CLI working-directory: ./ahnlich run: | cargo build --release --bin ${{ steps.get_binary_version.outputs.BIN_NAME }} tar -cvzf linux-${{ steps.get_binary_version.outputs.BIN_NAME }}.tar.gz -C target/release ${{ steps.get_binary_version.outputs.BIN_NAME }} + + cargo build --release --bin ahnlich_cli + tar -cvzf linux-ahnlich_cli.tar.gz -C target/release ahnlich_cli + gh release upload ${{github.event.release.tag_name}} linux-${{ steps.get_binary_version.outputs.BIN_NAME }}.tar.gz + gh release upload ${{github.event.release.tag_name}} linux-ahnlich_cli.tar.gz + env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} shell: bash @@ -53,24 +59,34 @@ jobs: run: | cargo install --locked cargo-zigbuild - - name: Build Aarch64 Darwin Release for ${{ steps.get_binary_version.outputs.BIN_NAME }} + - name: Build Aarch64 Darwin Release for ${{ steps.get_binary_version.outputs.BIN_NAME }} And CLI working-directory: ./ahnlich run: | rustup target add aarch64-apple-darwin cargo zigbuild --release --target aarch64-apple-darwin --bin ${{ steps.get_binary_version.outputs.BIN_NAME }} tar -cvzf aarch64-darwin-${{ steps.get_binary_version.outputs.BIN_NAME }}.tar.gz -C target/aarch64-apple-darwin/release ${{ steps.get_binary_version.outputs.BIN_NAME }} - gh release upload ${{github.event.release.tag_name}} aarch64-darwin-${{ steps.get_binary_version.outputs.BIN_NAME }}.tar.gz + + cargo zigbuild --release --target aarch64-apple-darwin --bin ahnlich_cli + tar -cvzf aarch64-darwin-ahnlich_cli.tar.gz -C target/aarch64-apple-darwin/release ahnlich_cli + + gh release upload ${{github.event.release.tag_name}} aarch64-darwin-${{ steps.get_binary_version.outputs.BIN_NAME }}.tar.gz + gh release upload ${{github.event.release.tag_name}} aarch64-darwin-ahnlich_cli.tar.gz env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} shell: bash - - name: Build x86_64 Apple Darwin Release for ${{ steps.get_binary_version.outputs.BIN_NAME }} + - name: Build x86_64 Apple Darwin Release for ${{ steps.get_binary_version.outputs.BIN_NAME }} And CLI working-directory: ./ahnlich run: | rustup target add x86_64-apple-darwin cargo zigbuild --release --target x86_64-apple-darwin --bin ${{ steps.get_binary_version.outputs.BIN_NAME }} tar -cvzf x86_64-apple-darwin-${{ steps.get_binary_version.outputs.BIN_NAME }}.tar.gz -C target/x86_64-apple-darwin/release ${{ steps.get_binary_version.outputs.BIN_NAME }} + + cargo zigbuild --release --target x86_64-apple-darwin --bin ahnlich_cli + tar -cvzf x86_64-apple-darwin-ahnlich_cli.tar.gz -C target/x86_64-apple-darwin/release ahnlich_cli + gh release upload ${{github.event.release.tag_name}} x86_64-apple-darwin-${{ steps.get_binary_version.outputs.BIN_NAME }}.tar.gz + gh release upload ${{github.event.release.tag_name}} x86_64-apple-darwin-ahnlich_cli.tar.gz env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} shell: bash @@ -89,11 +105,23 @@ jobs: args: "--locked --release --bin ${{ steps.get_binary_version.outputs.BIN_NAME }}" strip: true - - name: Package and upload x86_64-pc-windows-gnu for Ahnlich ${{ steps.get_binary_version.outputs.BIN_NAME }} + - name: Build Windows x86_64-pc-windows-gnu for Ahnlich CLI + uses: houseabsolute/actions-rust-cross@v0 + with: + working-directory: ./ahnlich + command: build + target: x86_64-pc-windows-gnu + args: "--locked --release --bin ahnlich_cli" + strip: true + + - name: Package and upload x86_64-pc-windows-gnu for Ahnlich ${{ steps.get_binary_version.outputs.BIN_NAME }} and CLI working-directory: ./ahnlich run: | cd target/x86_64-pc-windows-gnu/release/ && zip ../../../win-x86_64-gnu-${{ steps.get_binary_version.outputs.BIN_NAME }}.zip ${{ steps.get_binary_version.outputs.BIN_NAME }}.exe && cd ../../../ + cd target/x86_64-pc-windows-gnu/release/ && zip ../../../win-x86_64-gnu-ahnlich_cli.zip ahnlich_cli.exe && cd ../../../ + gh release upload ${{github.event.release.tag_name}} win-x86_64-gnu-${{ steps.get_binary_version.outputs.BIN_NAME }}.zip + gh release upload ${{github.event.release.tag_name}} win-x86_64-gnu-ahnlich_cli.zip env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} shell: bash diff --git a/ahnlich/Dockerfile b/ahnlich/Dockerfile index f603c8a8..748471b5 100644 --- a/ahnlich/Dockerfile +++ b/ahnlich/Dockerfile @@ -20,6 +20,7 @@ COPY . /app/ # Build our project RUN cargo build --release --bin ${AHNLICH_BIN} +RUN cargo build --release --bin ahnlich_cli FROM debian:bookworm-slim AS runtime @@ -37,6 +38,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends openssl ca-cert COPY --from=builder /app/target/release/${AHNLICH_BIN} /usr/local/bin/ +COPY --from=builder /app/target/release/ahnlich_cli /usr/local/bin/ ENV AHNLICH_BIN=${AHNLICH_BIN}