Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alyxshang authored Dec 7, 2024
1 parent 852bf7e commit 98c3532
Showing 1 changed file with 29 additions and 19 deletions.
48 changes: 29 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
on:
push:
tags:
- '*'
on: [push]
env:
MANDY_ENV: "production"

Expand All @@ -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

0 comments on commit 98c3532

Please sign in to comment.