Skip to content

Commit 6e8d12b

Browse files
authored
Merge pull request #291 from AustinWise/austin/Windows
Add support for generating Windows release assets
2 parents 50f3c8b + 3d3d54c commit 6e8d12b

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ jobs:
3333
- os: ubuntu-latest
3434
target_arch: aarch64-unknown-linux-gnu
3535
arch: arm64-linux
36+
- os: windows-latest
37+
target_arch: x86_64-pc-windows-msvc
38+
arch: x86_64-windows
39+
- os: windows-latest
40+
target_arch: i686-pc-windows-msvc
41+
arch: i686-windows
42+
- os: windows-latest
43+
target_arch: aarch64-pc-windows-msvc
44+
arch: arm64-windows
3645

3746
steps:
3847
- name: Checkout sources
@@ -68,11 +77,23 @@ jobs:
6877
CARGO_C_VERSION: v0.10.13
6978
run: |
7079
curl -L $LINK/$CARGO_C_VERSION/$CARGO_C_FILE | tar xz -C ~/.cargo/bin
80+
- name: Install cargo-c (Windows)
81+
if: matrix.os == 'windows-latest'
82+
env:
83+
LINK: https://github.com/lu-zero/cargo-c/releases/download
84+
CARGO_C_FILE: cargo-c-windows-msvc.zip
85+
CARGO_C_VERSION: v0.10.13
86+
shell: cmd
87+
run: |
88+
curl -L %LINK%/%CARGO_C_VERSION%/%CARGO_C_FILE% -o %TEMP%\%CARGO_C_FILE%
89+
tar xzf %TEMP%\%CARGO_C_FILE% -C %USERPROFILE%\.cargo\bin
90+
del %TEMP%\%CARGO_C_FILE%
7191
- name: Run cargo-c tests
7292
run: cargo ctest --release --features="capi"
7393
if: matrix.os == 'ubuntu-latest' && matrix.target_arch == 'x86_64-unknown-linux-gnu'
7494

7595
- name: Build C-API
96+
shell: bash
7697
run: |
7798
cargo cinstall --target ${{ matrix.target_arch }} \
7899
--prefix=/usr \
@@ -83,8 +104,9 @@ jobs:
83104
run: tar cvzf biscuit-auth-${{github.ref_name}}-${{matrix.arch}}.tar.gz -C build/ .
84105

85106
- name: Generate checksum
107+
shell: bash
86108
run: |
87-
if [[ "$RUNNER_OS" == "Linux" ]]; then
109+
if [[ "$RUNNER_OS" == "Linux" || "$RUNNER_OS" == "Windows" ]]; then
88110
sha256sum "biscuit-auth-${{github.ref_name}}-${{matrix.arch}}.tar.gz" > "biscuit-auth-${{github.ref_name}}-${{matrix.arch}}.tar.gz.sha256"
89111
else
90112
shasum -a 256 "biscuit-auth-${{github.ref_name}}-${{matrix.arch}}.tar.gz" > "biscuit-auth-${{github.ref_name}}-${{matrix.arch}}.tar.gz.sha256"

0 commit comments

Comments
 (0)