π bump: ηζ¬ v1.0.20 #59
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Multi-Platform AOT | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Update Version Info | |
| shell: pwsh | |
| run: pwsh -File ./scripts/set-version.ps1 | |
| - name: Build and Publish Windows x64 AOT | |
| run: dotnet publish ProxyChecker.csproj -r win-x64 -c Release --self-contained true -p:PublishAot=true -o ./publish/win-x64 | |
| - name: Build and Publish Windows x86 AOT | |
| run: dotnet publish ProxyChecker.csproj -r win-x86 -c Release --self-contained true -p:PublishAot=true -o ./publish/win-x86 | |
| - name: Build and Publish Windows ARM64 AOT | |
| run: dotnet publish ProxyChecker.csproj -r win-arm64 -c Release --self-contained true -p:PublishAot=true -o ./publish/win-arm64 | |
| - name: Install Velopack CLI | |
| run: dotnet tool install -g vpk | |
| - name: Get Version | |
| id: get_version | |
| shell: pwsh | |
| run: | | |
| $version = "${{ github.ref_name }}".TrimStart('v') | |
| echo "VERSION=$version" >> $env:GITHUB_OUTPUT | |
| - name: Pack Release | |
| run: | | |
| vpk pack -u ProxyChecker -v ${{ steps.get_version.outputs.VERSION }} -p ./publish/win-x64 -e ProxyChecker.exe | |
| - name: Upload Windows Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-releases | |
| path: | | |
| Releases/* | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Update Version Info | |
| run: pwsh -File ./scripts/set-version.ps1 | |
| - name: Build and Publish macOS x64 AOT | |
| run: dotnet publish ProxyChecker.csproj -r osx-x64 -c Release --self-contained true -p:PublishAot=true -o ./publish/osx-x64 | |
| - name: Build and Publish macOS ARM64 AOT | |
| run: dotnet publish ProxyChecker.csproj -r osx-arm64 -c Release --self-contained true -p:PublishAot=true -o ./publish/osx-arm64 | |
| - name: Install Velopack CLI | |
| run: dotnet tool install -g vpk | |
| - name: Get Version | |
| id: get_version | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#v} | |
| echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Create .app Bundle (x64) | |
| run: | | |
| mkdir -p ./publish/osx-x64/ProxyChecker.app/Contents/MacOS | |
| mkdir -p ./publish/osx-x64/ProxyChecker.app/Contents/Resources | |
| cp ./publish/osx-x64/ProxyChecker ./publish/osx-x64/ProxyChecker.app/Contents/MacOS/ | |
| cp ./publish/osx-x64/*.dylib ./publish/osx-x64/ProxyChecker.app/Contents/MacOS/ 2>/dev/null || : | |
| cat > ./publish/osx-x64/ProxyChecker.app/Contents/Info.plist <<EOF | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>CFBundleExecutable</key> | |
| <string>ProxyChecker</string> | |
| <key>CFBundleIdentifier</key> | |
| <string>com.interface95.proxychecker</string> | |
| <key>CFBundleName</key> | |
| <string>ProxyChecker</string> | |
| <key>CFBundleVersion</key> | |
| <string>${{ steps.get_version.outputs.VERSION }}</string> | |
| <key>CFBundleShortVersionString</key> | |
| <string>${{ steps.get_version.outputs.VERSION }}</string> | |
| <key>LSMinimumSystemVersion</key> | |
| <string>10.13</string> | |
| </dict> | |
| </plist> | |
| EOF | |
| - name: Create .app Bundle (ARM64) | |
| run: | | |
| mkdir -p ./publish/osx-arm64/ProxyChecker.app/Contents/MacOS | |
| mkdir -p ./publish/osx-arm64/ProxyChecker.app/Contents/Resources | |
| cp ./publish/osx-arm64/ProxyChecker ./publish/osx-arm64/ProxyChecker.app/Contents/MacOS/ | |
| cp ./publish/osx-arm64/*.dylib ./publish/osx-arm64/ProxyChecker.app/Contents/MacOS/ 2>/dev/null || : | |
| cat > ./publish/osx-arm64/ProxyChecker.app/Contents/Info.plist <<EOF | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>CFBundleExecutable</key> | |
| <string>ProxyChecker</string> | |
| <key>CFBundleIdentifier</key> | |
| <string>com.interface95.proxychecker</string> | |
| <key>CFBundleName</key> | |
| <string>ProxyChecker</string> | |
| <key>CFBundleVersion</key> | |
| <string>${{ steps.get_version.outputs.VERSION }}</string> | |
| <key>CFBundleShortVersionString</key> | |
| <string>${{ steps.get_version.outputs.VERSION }}</string> | |
| <key>LSMinimumSystemVersion</key> | |
| <string>11.0</string> | |
| </dict> | |
| </plist> | |
| EOF | |
| - name: Pack Release (x64) | |
| run: | | |
| vpk pack -u ProxyChecker -v ${{ steps.get_version.outputs.VERSION }} -p ./publish/osx-x64/ProxyChecker.app -e ProxyChecker | |
| mv Releases Releases-x64 | |
| - name: Pack Release (ARM64) | |
| run: | | |
| vpk pack -u ProxyChecker-arm64 -v ${{ steps.get_version.outputs.VERSION }} -p ./publish/osx-arm64/ProxyChecker.app -e ProxyChecker | |
| mv Releases Releases-arm64 | |
| # Rename ARM64 metadata files to avoid conflict with x64 | |
| cd Releases-arm64 | |
| [ -f RELEASES-osx ] && mv RELEASES-osx RELEASES-osx-arm64 | |
| [ -f releases.osx.json ] && mv releases.osx.json releases-osx-arm64.json | |
| [ -f assets.osx.json ] && mv assets.osx.json assets-osx-arm64.json | |
| - name: Upload macOS Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-releases | |
| path: | | |
| Releases-x64/* | |
| Releases-arm64/* | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: | |
| - name: x64 | |
| runtime: linux-x64 | |
| cross_compile: false | |
| - name: arm64 | |
| runtime: linux-arm64 | |
| cross_compile: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Install cross-compilation tools and dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang zlib1g-dev dpkg-dev | |
| if [ "${{ matrix.arch.cross_compile }}" = "true" ]; then | |
| # Install ARM64 cross-compilation tools | |
| sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu | |
| # Create symlinks to ensure the correct tools are used | |
| sudo ln -sf /usr/bin/aarch64-linux-gnu-objcopy /usr/local/bin/objcopy | |
| sudo ln -sf /usr/bin/aarch64-linux-gnu-strip /usr/local/bin/strip | |
| else | |
| # For x64, install native tools | |
| sudo apt-get install -y build-essential | |
| fi | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Publish AOT Linux ${{ matrix.arch.name }} | |
| run: | | |
| if [ "${{ matrix.arch.cross_compile }}" = "true" ]; then | |
| export CC=aarch64-linux-gnu-gcc | |
| export CXX=aarch64-linux-gnu-g++ | |
| CROSS_COMPILE_FLAG="-p:CrossCompiling=true" | |
| else | |
| export CC=gcc | |
| export CXX=g++ | |
| CROSS_COMPILE_FLAG="" | |
| fi | |
| # Verify tools are available | |
| which objcopy | |
| which strip | |
| objcopy --version | |
| dotnet publish ProxyChecker.csproj \ | |
| --configuration Release \ | |
| --runtime ${{ matrix.arch.runtime }} \ | |
| --self-contained true \ | |
| --output ./publish/${{ matrix.arch.name }} \ | |
| -p:PublishAot=true \ | |
| -p:StripSymbols=true \ | |
| -p:PublishTrimmed=true \ | |
| -p:TrimMode=link \ | |
| $CROSS_COMPILE_FLAG | |
| - name: Create Archives | |
| run: | | |
| cd ./publish/${{ matrix.arch.name }} | |
| tar -czf ../../ProxyChecker-linux-${{ matrix.arch.name }}.tar.gz . | |
| - name: Upload Linux ${{ matrix.arch.name }} Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-${{ matrix.arch.name }}-releases | |
| path: | | |
| *.tar.gz | |
| create-release: | |
| needs: [build-windows, build-macos, build-linux] | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download Windows Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-releases | |
| path: windows-releases | |
| - name: Download macOS Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: macos-releases | |
| path: macos-releases | |
| - name: Download Linux x64 Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-x64-releases | |
| path: linux-x64-releases | |
| - name: Download Linux ARM64 Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-arm64-releases | |
| path: linux-arm64-releases | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| windows-releases/* | |
| macos-releases/**/* | |
| linux-x64-releases/* | |
| linux-arm64-releases/**/* | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |