Skip to content

Commit c898732

Browse files
committed
Release MSVC version
1 parent d947f04 commit c898732

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

.github/workflows/release.yaml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ env:
2222
jobs:
2323
release:
2424
name: release
25-
runs-on: ubuntu-latest
25+
runs-on: windows-latest
2626
steps:
2727
- name: Get release information
2828
id: info
29+
shell: bash
2930
run: |
3031
ref_name='${{ github.ref_name }}'
3132
echo "ref_name: $ref_name"
@@ -56,11 +57,6 @@ jobs:
5657
echo "target_commitish=$target_commitish" >> $GITHUB_OUTPUT
5758
echo "date=$date" >> $GITHUB_OUTPUT
5859
echo "prerelease=$prerelease" >> $GITHUB_OUTPUT
59-
shell: bash
60-
61-
- name: Install Mingw-w64
62-
shell: bash
63-
run: sudo apt install -y --no-install-recommends gcc-mingw-w64-i686
6460
6561
- name: Checkout repository
6662
uses: actions/checkout@v4
@@ -70,8 +66,12 @@ jobs:
7066
run: rustup show
7167

7268
- name: Build release binary
73-
run: cargo build --verbose --release --package 'zipfixup' --package 'zippatch'
7469
shell: bash
70+
run: cargo build --verbose --release --package 'zipfixup' --package 'zippatch' --target 'i686-pc-windows-msvc'
71+
72+
- name: Run export checker
73+
shell: bash
74+
run: cargo run --package 'export-check' --target 'x86_64-pc-windows-msvc' -- 'target/i686-pc-windows-msvc/release/zipfixup.dll'
7575

7676
- name: Build archive
7777
id: build
@@ -80,14 +80,18 @@ jobs:
8080
archive="ZipperFixup-${{ steps.info.outputs.version }}.zip"
8181
mkdir 'staging'
8282
cp 'misc/Readme.txt' 'staging/'
83-
cp 'target/i686-pc-windows-gnu/release/zipfixup.dll' 'staging/'
84-
cp 'target/i686-pc-windows-gnu/release/zippatch.exe' 'staging/'
83+
cp 'LICENSE' 'staging/'
84+
cp 'target/i686-pc-windows-msvc/release/zipfixup.dll' 'staging/'
85+
cp 'target/i686-pc-windows-msvc/release/zippatch.exe' 'staging/'
8586
# junk paths so staging/ doesn't appear in the zip
86-
zip -j "$archive" staging/*
87+
# zip -j "$archive" staging/*
88+
cd 'staging/'
89+
7z a -tzip "../$archive" *
8790
echo "asset=$archive" >> $GITHUB_OUTPUT
8891
8992
- name: Create GitHub release
9093
id: release
94+
shell: bash
9195
run: |
9296
curl \
9397
--fail \
@@ -110,10 +114,10 @@ jobs:
110114
upload_url="${upload_url%%'{?name,label}'}"
111115
echo "upload_url: $upload_url"
112116
echo "upload_url=$upload_url" >> $GITHUB_OUTPUT
113-
shell: bash
114117
115118
- name: Upload release archive
116119
id: upload
120+
shell: bash
117121
# use `--http1.1` to work around Windows-only issue
118122
# https://github.com/actions/runner-images/issues/7329
119123
run: |
@@ -126,4 +130,3 @@ jobs:
126130
--header 'Authorization: Bearer ${{ github.token }}' \
127131
--header 'Content-type: application/octet-stream' \
128132
--data-binary '@${{ steps.build.outputs.asset }}'
129-
shell: bash

0 commit comments

Comments
 (0)