mirror of
https://github.com/mifi/lossless-cut.git
synced 2026-09-17 17:39:29 +08:00
Use runner.arch instead of runner image names in Windows conditions
Gating steps on the exact matrix image name (windows-latest, windows-11-arm) breaks silently whenever the image in the matrix is renamed, as happened with the windows-2022 switch. runner.os and runner.arch describe what we actually care about and are independent of the image label. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWvFPqUcXUzsYf3DY7RziJ
This commit is contained in:
@@ -48,10 +48,10 @@ jobs:
|
||||
|
||||
# This global ffmpeg is used for screenshots (see below)
|
||||
- uses: AnimMouse/setup-ffmpeg@v1
|
||||
if: matrix.os != 'windows-11-arm' && env.is_tag == 'false'
|
||||
if: (runner.os != 'Windows' || runner.arch != 'ARM64') && env.is_tag == 'false'
|
||||
|
||||
- run: ffmpeg -version
|
||||
if: matrix.os != 'windows-11-arm'
|
||||
if: runner.os != 'Windows' || runner.arch != 'ARM64'
|
||||
|
||||
# Because of timeout issue https://github.com/yarnpkg/yarn/issues/4890
|
||||
- run: yarn install --immutable --network-timeout 1000000
|
||||
@@ -81,11 +81,11 @@ jobs:
|
||||
yarn download-ffmpeg-darwin-arm64
|
||||
|
||||
- name: (Windows x64) Download ffmpeg
|
||||
if: runner.os == 'Windows' && matrix.os != 'windows-11-arm'
|
||||
if: runner.os == 'Windows' && runner.arch == 'X64'
|
||||
run: yarn download-ffmpeg-win32-x64
|
||||
|
||||
- name: (Windows ARM64) Download ffmpeg
|
||||
if: matrix.os == 'windows-11-arm'
|
||||
if: runner.os == 'Windows' && runner.arch == 'ARM64'
|
||||
run: yarn download-ffmpeg-win32-arm64
|
||||
|
||||
- name: (Linux) Download ffmpeg
|
||||
@@ -116,13 +116,13 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.github_token }}
|
||||
|
||||
- name: Build for Windows x64
|
||||
if: runner.os == 'Windows' && matrix.os != 'windows-11-arm'
|
||||
if: runner.os == 'Windows' && runner.arch == 'X64'
|
||||
run: yarn electron-builder --publish onTag --win --x64
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.github_token }}
|
||||
|
||||
- name: Build for Windows ARM64
|
||||
if: matrix.os == 'windows-11-arm'
|
||||
if: runner.os == 'Windows' && runner.arch == 'ARM64'
|
||||
run: yarn electron-builder --publish onTag --win --arm64
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.github_token }}
|
||||
@@ -131,7 +131,7 @@ jobs:
|
||||
if: runner.os == 'macOS' && env.is_tag == 'false'
|
||||
|
||||
- run: node script/e2e.ts 'dist\win-unpacked\LosslessCut.exe' desktop screenshot.jpeg
|
||||
if: runner.os == 'Windows' && matrix.os != 'windows-11-arm' && env.is_tag == 'false'
|
||||
if: runner.os == 'Windows' && runner.arch == 'X64' && env.is_tag == 'false'
|
||||
|
||||
- run: |
|
||||
export DISPLAY=:0
|
||||
@@ -170,10 +170,10 @@ jobs:
|
||||
ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }}
|
||||
ACTIONS_RESULTS_URL: ${{ env.ACTIONS_RESULTS_URL }}
|
||||
run: |
|
||||
yarn upload-artifacts dist/LosslessCut-win-${{ matrix.os == 'windows-11-arm' && 'arm64' || 'x64' }}.7z
|
||||
yarn upload-artifacts dist/LosslessCut-win-${{ runner.arch == 'ARM64' && 'arm64' || 'x64' }}.7z
|
||||
|
||||
- name: (Windows x64) Upload screenshot
|
||||
if: runner.os == 'Windows' && matrix.os != 'windows-11-arm' && env.is_tag == 'false'
|
||||
if: runner.os == 'Windows' && runner.arch == 'X64' && env.is_tag == 'false'
|
||||
env:
|
||||
ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }}
|
||||
ACTIONS_RESULTS_URL: ${{ env.ACTIONS_RESULTS_URL }}
|
||||
|
||||
Reference in New Issue
Block a user