From b0b8cd4874ca75ab1f512d92e5f4503f21a0c611 Mon Sep 17 00:00:00 2001 From: Jez <75403863+jzeuzs@users.noreply.github.com> Date: Wed, 9 Aug 2023 00:50:13 +0800 Subject: [PATCH] Add windows `.msi` installers (#937) --- .github/workflows/release.yml | 31 +++++ docs/pages/docs/install.md | 4 + wix/License.rtf | Bin 0 -> 1255 bytes wix/main.wxs | 215 ++++++++++++++++++++++++++++++++++ 4 files changed, 250 insertions(+) create mode 100644 wix/License.rtf create mode 100644 wix/main.wxs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 49a45a6f4..cf421b6fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,6 +56,8 @@ jobs: needs: ['create-release'] runs-on: ${{ matrix.os }} continue-on-error: true + env: + RUSTFLAGS: ${{ matrix.rustflags || '' }} strategy: fail-fast: false matrix: @@ -83,12 +85,15 @@ jobs: - target: x86_64-pc-windows-msvc os: windows-latest + rustflags: -C target-feature=+crt-static - target: i686-pc-windows-msvc os: windows-latest + rustflags: -C target-feature=+crt-static - target: aarch64-pc-windows-msvc os: windows-latest + rustflags: -C target-feature=+crt-static # - target: x86_64-unknown-freebsd # os: ubuntu-latest @@ -156,6 +161,32 @@ jobs: tag: ${{ needs.create-release.outputs.nixpacks_version }} file: nixpacks-${{ needs.create-release.outputs.nixpacks_version }}-amd64.deb + - name: Install cargo-wix + continue-on-error: true + # aarch64 is not supported by cargo-wix since it requires wix v4 + # see https://github.com/volks73/cargo-wix/issues/174 + if: matrix.os == 'windows-latest' && matrix.target != 'aarch64-pc-windows-msvc' + run: cargo install cargo-wix + env: + # cargo-wix does not require static crt + RUSTFLAGS: "" + + - name: Create windows installers + continue-on-error: true + if: matrix.os == 'windows-latest' && matrix.target != 'aarch64-pc-windows-msvc' + run: > + cargo wix -v --no-build --nocapture + --target ${{ matrix.target }} + --output nixpacks-${{ needs.create-release.outputs.nixpacks_version }}-${{ matrix.target }}.msi + + - name: Upload windows installers + continue-on-error: true + if: matrix.os == 'windows-latest' && matrix.target != 'aarch64-pc-windows-msvc' + uses: svenstaro/upload-release-action@v2 + with: + tag: ${{ needs.create-release.outputs.nixpacks_version }} + file: nixpacks-${{ needs.create-release.outputs.nixpacks_version }}-${{ matrix.target }}.msi + - name: Set SHA if: matrix.config.os == 'macos-latest' id: shasum diff --git a/docs/pages/docs/install.md b/docs/pages/docs/install.md index 76737d5e9..6f1371e87 100644 --- a/docs/pages/docs/install.md +++ b/docs/pages/docs/install.md @@ -54,6 +54,10 @@ Install Nixpacks from Scoop using the [official bucket](https://github.com/Scoop scoop install nixpacks ``` +## Windows + +Nixpacks provides `.msi` files provided in each [release](https://github.com/railwayapp/nixpacks/releases). + ## Source Build and install from source using [Rust](https://www.rust-lang.org/tools/install). diff --git a/wix/License.rtf b/wix/License.rtf new file mode 100644 index 0000000000000000000000000000000000000000..9875f2ba2a5dff3754a07c1e84b487fe8f6ec82c GIT binary patch literal 1255 zcmZ8hUu)Ys6yI~9-{H`wZI~?Sy34)WljP)fi1j+Atl z4g!vk&iVa2Mo+c%-K-Ycsk)V2H?6f9Rb%!C;h*ZxXz#ZJ{+ZUDRzux2y|7ODDG;l~ z@Z}kgW`7^0X0%FL$mQ|N^Yi7!Q~kc)NiD7L#sXJOFWc)W%%+p+WcF$L&&TKbmy*Yy zO1C%l*v#PaqCN=Q)=td+MPhe-Qx8J#{)5yU94Hi6Dc38sVKVJ8#t284cugR~9@%+?E~mEM7X26;lK?-9nC z&L4%9*xZ6}&NNCO9<-(z_fmV|17D{G>ENyJC0v!~iK};!q?KX-r4dcS%Ml!v@6G7J zO6RR=0!D&O%`mn>!^`oY_UgS9k|!EBKK98u&w_GbUu2}ab7RwE^bf-|kb$Rgtp z+4xWi$~!X*<`}FsMz<>Xb)QdLtMFKC%`X}Koc61YN4YWbxP&O=wAu5K>jmoH%5!MQ zjS+{^izRe8Zk@;FYi{4tb{c$zOgx-!xbs<{VIWb zRxOK71=zt!UOhmu0FpnzSC-Ecpx@V=mL(J%*lL|IiZzy}*=El2JGjNUyr>{!D^?+B zRYbxw6r(t|fEDHG5|PO*%UJc0z=BnIz+50Gfi>Y3OE($eu-@=>QBtIzBW%v{1xFUT zqIoqzR;&U2hA&VqNtQ(_vO)Dc>Pw6D17~;33YJASr&zqDsEpiZ^hAZG(u}ZG0&}t= zcR?M80u$n~?X2#8Nn;852>#NF6?w3c7J0?-H9?oW`ZIdZN}2%StPFuHc!BUCPMipt ry2Pb*w6+||Isq1BttA*PyVWT5^k(`CE)$@=JMh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +