summaryrefslogtreecommitdiff
path: root/neozip/.github/workflows/release.yml
diff options
context:
space:
mode:
Diffstat (limited to 'neozip/.github/workflows/release.yml')
-rw-r--r--neozip/.github/workflows/release.yml123
1 files changed, 123 insertions, 0 deletions
diff --git a/neozip/.github/workflows/release.yml b/neozip/.github/workflows/release.yml
new file mode 100644
index 0000000000..5fa47eb834
--- /dev/null
+++ b/neozip/.github/workflows/release.yml
@@ -0,0 +1,123 @@
+name: Release
+on:
+ push:
+ tags:
+ - '*'
+jobs:
+ release:
+ name: ${{ matrix.name }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - name: Windows MSVC Win32
+ os: windows-latest
+ compiler: cl
+ cmake-args: -A Win32
+ deploy-name: win-x86
+
+ - name: Windows MSVC Win32 Compat
+ os: windows-latest
+ compiler: cl
+ cmake-args: -A Win32 -DZLIB_COMPAT=ON
+ deploy-name: win-x86-compat
+
+ - name: Windows MSVC Win64
+ os: windows-latest
+ compiler: cl
+ cmake-args: -A x64
+ deploy-name: win-x86-64
+
+ - name: Windows MSVC Win64 Compat
+ os: windows-latest
+ compiler: cl
+ cmake-args: -A x64 -DZLIB_COMPAT=ON
+ deploy-name: win-x86-64-compat
+
+ - name: Windows MSVC ARM
+ os: windows-latest
+ compiler: cl
+ cmake-args: -A ARM,version=10.0.22621.0
+ deploy-name: win-arm
+
+ - name: Windows MSVC ARM Compat
+ os: windows-latest
+ compiler: cl
+ cmake-args: -A ARM,version=10.0.22621.0 -DZLIB_COMPAT=ON
+ deploy-name: win-arm-compat
+
+ - name: Windows MSVC ARM64
+ os: windows-latest
+ compiler: cl
+ cmake-args: -A ARM64
+ deploy-name: win-arm64
+
+ - name: Windows MSVC ARM64 Compat
+ os: windows-latest
+ compiler: cl
+ cmake-args: -A ARM64 -DZLIB_COMPAT=ON
+ deploy-name: win-arm64-compat
+
+ - name: Windows MSVC ARM64EC
+ os: windows-latest
+ compiler: cl
+ cmake-args: -A ARM64EC
+ deploy-name: win-arm64ec
+
+ - name: Windows MSVC ARM64EC Compat
+ os: windows-latest
+ compiler: cl
+ cmake-args: -A ARM64EC -DZLIB_COMPAT=ON
+ deploy-name: win-arm64ec-compat
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v6
+ with:
+ show-progress: 'false'
+
+ - name: Set environment variables
+ shell: bash
+ run: echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
+
+ - name: Install Windows 11 SDK (ARM)
+ if: matrix.name == 'Windows MSVC ARM' || matrix.name == 'Windows MSVC ARM Compat'
+ run: |
+ # Windows 11 SDK (10.0.22621.2428)
+ # https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/index-legacy
+ Invoke-WebRequest -Method Get -Uri https://go.microsoft.com/fwlink/p/?LinkId=2250105 -OutFile sdksetup.exe -UseBasicParsing
+ Unblock-File sdksetup.exe
+ Start-Process -Wait sdksetup.exe -ArgumentList "/q", "/norestart", "/ceip off"
+
+ - name: Generate project files
+ shell: bash
+ run: |
+ cmake . ${{ matrix.cmake-args }} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DZLIB_ENABLE_TESTS=ON \
+ -DCMAKE_INSTALL_PREFIX=out \
+ -DINSTALL_UTILS=ON
+ env:
+ CC: ${{ matrix.compiler }}
+ CI: true
+
+ - name: Compile source code
+ run: cmake --build . -j5 --config Release --target install
+
+ - name: Package release (Windows)
+ if: runner.os == 'Windows'
+ run: 7z a -tzip ../zlib-ng-${{ matrix.deploy-name }}.zip bin include lib ../LICENSE.md ../PORTING.md ../README.md
+ working-directory: out
+
+ - name: Upload release (Windows)
+ uses: svenstaro/upload-release-action@v2
+ if: runner.os == 'Windows'
+ with:
+ asset_name: zlib-ng-${{ matrix.deploy-name }}.zip
+ file: zlib-ng-${{ matrix.deploy-name }}.zip
+ tag: ${{env.tag}}
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ overwrite: true
+ env:
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"