use build matrix variables: artifact_name

This commit is contained in:
Bruno Alexandre Rosa 2025-10-29 10:53:28 -03:00
parent a8b2f58435
commit 61b7dbda0b

View file

@ -253,6 +253,7 @@ jobs:
override_target: 13 override_target: 13
make_package: 1 make_package: 1
package_suffix: "-macOS13_Intel" package_suffix: "-macOS13_Intel"
artifact_name: "macOS13_Intel-package"
- os: macOS - os: macOS
target: 14 target: 14
@ -262,6 +263,7 @@ jobs:
type: Release type: Release
make_package: 1 make_package: 1
package_suffix: "-macOS14" package_suffix: "-macOS14"
artifact_name: "macOS14-package"
- os: macOS - os: macOS
target: 15 target: 15
@ -271,6 +273,7 @@ jobs:
type: Release type: Release
make_package: 1 make_package: 1
package_suffix: "-macOS15" package_suffix: "-macOS15"
artifact_name: "macOS15-package"
- os: macOS - os: macOS
target: 15 target: 15
@ -279,12 +282,14 @@ jobs:
xcode: "16.4" xcode: "16.4"
type: Debug type: Debug
package_suffix: "-macOS15_Debug" package_suffix: "-macOS15_Debug"
artifact_name: "macOS15_Debug-package"
- os: Windows - os: Windows
target: 7 target: 7
runner: windows-2022 runner: windows-2022
make_package: 1 make_package: 1
package_suffix: "-Win7" package_suffix: "-Win7"
artifact_name: "Windows7-installer"
qt_version: 5.15.* qt_version: 5.15.*
- os: Windows - os: Windows
@ -292,6 +297,7 @@ jobs:
runner: windows-2022 runner: windows-2022
make_package: 1 make_package: 1
package_suffix: "-Win10" package_suffix: "-Win10"
artifact_name: "Windows10-installer"
qt_version: 6.6.* qt_version: 6.6.*
name: ${{ matrix.os }} ${{ matrix.target }}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} name: ${{ matrix.os }} ${{ matrix.target }}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }}
@ -342,17 +348,6 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure macOS
if: matrix.os == 'macOS'
run: |
echo "ARTIFACT_NAME=${{ matrix.os }}${{ matrix.target }}${{ matrix.soc == 'Intel' && '_Intel' || '' }}${{ matrix.type == 'Debug' && '_Debug' || '' }}-package" >> $GITHUB_ENV
- name: Configure Windows
if: matrix.os == 'Windows'
shell: bash # needs to be bash to export environment variables via GITHUB_ENV
run: |
echo "ARTIFACT_NAME=${{ matrix.os }}${{ matrix.target }}-installer" >> $GITHUB_ENV
# uses environment variables, see compile.sh for more details # uses environment variables, see compile.sh for more details
- name: Build Cockatrice - name: Build Cockatrice
id: build id: build
@ -424,7 +419,7 @@ jobs:
if: matrix.make_package if: matrix.make_package
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: ${{ env.ARTIFACT_NAME }} name: ${{ matrix.artifact_name }}
path: ${{ steps.build.outputs.path }} path: ${{ steps.build.outputs.path }}
if-no-files-found: error if-no-files-found: error