From 98c35326cc4e958243d984d768ae9b794fcfcead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=96=A4=F0=9D=93=90=F0=9D=93=9B=F0=9D=93=A8?= =?UTF-8?q?=F0=9D=93=A7=F0=9F=96=A4?= <179976644+alyxshang@users.noreply.github.com> Date: Sat, 7 Dec 2024 18:27:09 +0100 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 48 +++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 20d0e0a..920116e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,4 @@ -on: - push: - tags: - - '*' +on: [push] env: MANDY_ENV: "production" @@ -24,42 +21,55 @@ jobs: command: build args: --release - - name: Rename binary for Windows. + - name: "Rename binary for Windows." if: runner.os == 'Windows' shell: bash run: | mv target/release/mandy.exe ./mandy-windows-v.0.1.0.exe ls - - name: Rename binary for Mac OS. - if: runner.os == 'Macos' + - name: "Rename binary for Mac OS (ARM64)." + if: runner.os == 'Macos' && runner.architecture != "x64" run: | - mv target/release/mandy ./mandy-macos-v.0.1.0.bin + mv target/release/mandy ./mandy-macos-aarch64-v.0.1.0 + ls + + - name: "Rename binary for Mac OS (X64)." + if: runner.os == 'Macos' && runner.architecture == "x64" + run: | + mv target/release/mandy ./mandy-macos-x64-v.0.1.0 ls - - name: Rename binary for Linux. + - name: "Rename binary for Linux." if: runner.os == 'Linux' run: | - mv target/release/mandy ./mandy-linux-v.0.1.0.bin + mv target/release/mandy ./mandy-linux-v.0.1.0 ls - - name: Upload binary as an artifact (Windows). + - name: "Upload binary as an artifact (Windows)." if: runner.os == 'Windows' uses: actions/upload-artifact@v4 with: name: Mandy Binary for Windows path: mandy-windows-v.0.1.0.exe - - name: Upload binary as an artifact (Macos). - if: runner.os == 'Macos' + - name: "Upload binary as an artifact (Macos ARM64)." + if: runner.os == 'Macos' && runner.architecture != 'x64' uses: actions/upload-artifact@v4 with: - name: Mandy Binary for Mac OS - path: mandy-macos-v.0.1.0.bin - - - name: Upload binary as an artifact (Linux). + name: mandy-macos-aarch64 + path: mandy-macos-aarch64-v.0.1.0 + + - name: "Upload binary as an artifact (Macos X64)." + if: runner.os == 'Macos' && runner.architecture == 'x64' + uses: actions/upload-artifact@v4 + with: + name: mandy-macos-aarch64 + path: mandy-macos-x64-v.0.1.0 + + - name: "Upload binary as an artifact (Linux)." if: runner.os == 'Linux' uses: actions/upload-artifact@v4 with: - name: Mandy Binary for Linux - path: mandy-linux-v.0.1.0.bin + name: mandy-linux-x64 + path: mandy-linux-v.0.1.0