99 build_publish :
1010 name : Publishing Tasks
1111 strategy :
12+ fail-fast : false
1213 matrix :
1314 target :
1415 - x86_64-unknown-linux-gnu
@@ -47,16 +48,18 @@ jobs:
4748 - uses : dtolnay/rust-toolchain@stable
4849
4950 - name : Prepare
51+ if : ${{ !cancelled() }}
5052 shell : bash
5153 run : |
5254 cargo install cbindgen
5355 mkdir mypubdir4
5456 rustup target add ${{ matrix.target }}
5557 if [[ "${{ matrix.host_os }}" == "ubuntu-latest" ]]; then
56- sudo .github/workflows/install- cross.sh
58+ cargo install cross --git https://github.com/cross-rs/ cross.git --rev e281947
5759 fi
5860
5961 - name : Build
62+ if : ${{ !cancelled() }}
6063 shell : bash
6164 run : |
6265 if [[ "${{ matrix.host_os }}" == "ubuntu-latest" ]]; then
@@ -67,23 +70,27 @@ jobs:
6770 cbindgen --config cbindgen.toml -o target/dns2socks.h
6871 if [[ "${{ matrix.host_os }}" == "windows-latest" ]]; then
6972 powershell -Command "(Get-Item README.md).LastWriteTime = Get-Date"
70- powershell Compress-Archive -Path target/${{ matrix.target }}/release/dns2socks.exe, README.md, target/dns2socks.h, target/${{ matrix.target }}/release/dns2socks .dll -DestinationPath mypubdir4/dns2socks-${{ matrix.target }}.zip
73+ powershell Compress-Archive -Path target/${{ matrix.target }}/release/dns2socks.exe, README.md, target/dns2socks.h, target/${{ matrix.target }}/release/dns2socks_core .dll -DestinationPath mypubdir4/dns2socks-${{ matrix.target }}.zip
7174 elif [[ "${{ matrix.host_os }}" == "macos-latest" ]]; then
72- zip -j mypubdir4/dns2socks-${{ matrix.target }}.zip target/${{ matrix.target }}/release/dns2socks README.md target/dns2socks.h target/${{ matrix.target }}/release/libdns2socks .dylib
75+ zip -j mypubdir4/dns2socks-${{ matrix.target }}.zip target/${{ matrix.target }}/release/dns2socks README.md target/dns2socks.h target/${{ matrix.target }}/release/libdns2socks_core .dylib
7376 if [[ "${{ matrix.target }}" == "x86_64-apple-darwin" ]]; then
7477 ./build-aarch64-apple-ios.sh
7578 zip -r mypubdir4/dns2socks-aarch64-apple-ios-xcframework.zip ./dns2socks.xcframework/
7679 ./build-apple.sh
7780 zip -r mypubdir4/dns2socks-apple-xcframework.zip ./dns2socks.xcframework/
7881 fi
7982 elif [[ "${{ matrix.host_os }}" == "ubuntu-latest" ]]; then
80- zip -j mypubdir4/dns2socks-${{ matrix.target }}.zip target/${{ matrix.target }}/release/dns2socks README.md target/dns2socks.h target/${{ matrix.target }}/release/libdns2socks .so
83+ zip -j mypubdir4/dns2socks-${{ matrix.target }}.zip target/${{ matrix.target }}/release/dns2socks README.md target/dns2socks.h target/${{ matrix.target }}/release/libdns2socks_core .so
8184 fi
8285
8386 - name : Publish
87+ if : ${{ !cancelled() }}
8488 uses : softprops/action-gh-release@v2
8589 env :
8690 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8791 with :
8892 files : mypubdir4/*
8993
94+ - name : Abort on error
95+ if : ${{ failure() }}
96+ run : echo "Publish job failed" && false
0 commit comments