Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Native Binary Release

on:
push:
tags:
- '*'
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -38,15 +36,25 @@ jobs:
- name: Build Binary
run: cargo build --release --target ${{ matrix.target }}

- name: Archive Binary
- name: Archive Binary (Unix)
if: runner.os != 'Windows'
run: |
BIN_NAME="corgea${{ matrix.ext }}"
TARGET_DIR="target/${{ matrix.target }}/release"
ARCHIVE_NAME="${BIN_NAME}-${{ matrix.target }}.zip"
cd $TARGET_DIR
cd "$TARGET_DIR"
zip -j "../../../$ARCHIVE_NAME" "$BIN_NAME"
shell: bash

- name: Archive Binary (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$BinName = "corgea${{ matrix.ext }}"
$TargetDir = "target/${{ matrix.target }}/release"
$ArchiveName = "$BinName-${{ matrix.target }}.zip"
Compress-Archive -Path "$TargetDir\$BinName" -DestinationPath "$ArchiveName" -Force

- name: Upload Based on Event Type
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
Expand All @@ -60,4 +68,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.target }}
path: "*.zip"
path: "*.zip"
Loading