From db0c195f73b2ba03c758a46f8db7aa089b363c43 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Thu, 29 Feb 2024 19:52:50 +0100 Subject: [PATCH] [CI] Automatically compile and package Windows binaries for releases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's try this and see if I like the result… …and I do! • While this action uses the `x86_64-pc-windows-gnu` triple instead of `x86_64-pc-windows-msvc` and is therefore slightly less native with the additional dependency on MSVCRT.DLL, it's only 44 KiB larger, which is more than offset by specifying `codegen-units = 1`. • *Any* type of CI build avoids the inherent path leaking problem with PDBs, without requiring any of the crazy and nightly-exclusive flags documented at https://github.com/johnthagen/min-sized-rust, Part of P0268, funded by Ember2528. --- .github/workflows/release.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bf6dec2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +on: + release: + types: [created] + +jobs: + release: + permissions: write-all + name: release ${{ matrix.target }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + target: [x86_64-pc-windows-gnu] + steps: + - uses: actions/checkout@master + - name: Compile and release + uses: rust-build/rust-build.action@v1.4.5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + RUSTTARGET: ${{ matrix.target }} + EXTRA_FILES: "COPYING README.md"