Skip to content

Build for release

Build for release #10

Workflow file for this run

name: Build for release
on:
# release:
# types:
# - created
workflow_dispatch:
inputs: {}
jobs:
release-build:
name: Release ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary_name: kameloso
- build: windows-gnu
os: windows-latest
target: x86_64-pc-windows-gnu
binary_name: kameloso.exe
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Create archive folder
run: mkdir kameloso
- name: Copy artifact
run: cp target/${{ matrix.target }}/release/${{ matrix.binary_name }} kameloso/
- name: Copy public folder
run: cp -r public kameloso/public
- name: Create archive (linux)
if: ${{ ! startsWith(matrix.build, 'windows') }}
run: zip -r kameloso-${{ matrix.target }}.zip kameloso
- name: Create archive (windows)
if: ${{ startsWith(matrix.build, 'windows') }}
run: Compress-Archive -DestinationPath kameloso-${{ matrix.target }}.zip -Path kameloso
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: kameloso-${{ matrix.target }}
path: kameloso-${{ matrix.target }}.zip