Skip to content

.github/workflows/build.yaml #6

.github/workflows/build.yaml

.github/workflows/build.yaml #6

Workflow file for this run

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
jobs:
build:
name: "Build packages"
strategy:
matrix:
os:
- "windows-latest"
- "ubuntu-latest"
- "macos-latest"
aot:
- true
- false
runs-on: ${{ matrix.os }}
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Setup python"
uses: "actions/setup-dotnet@v4"
with:
dotnet-version: '8'
- name: "Install AoT requirements"
if: matrix.aot && matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y clang zlib1g-dev
- name: "Publish binary"
run: "dotnet publish ./E5Renewer --output dist -p PublishAoT=${{ matrix.aot }}"
- name: "Create archive"
run: "7z a E5Renewer-${{ matrix.os }}-${{ matrix.os == 'macos-latest' && 'arm64' || 'x86_64' }}-${{ matrix.aot && 'aot' || 'noaot' }}.7z dist/*"
- name: "Upload archive"
uses: "actions/upload-artifact@v4"
with:
name: "E5Renewer-${{ matrix.os }}-${{ matrix.os == 'macos-latest' && 'arm64' || 'x86_64' }}-${{ matrix.aot && 'aot' || 'noaot' }}"
file: "E5Renewer-*.7z"
release:
name: "Upload release"
runs-on: "ubuntu-latest"
needs: "build"
steps:
- name: "Download archive"
uses: "actions/download-artifact@v4"
- name: "Create release"
uses: "softprops/action-gh-release@v2"
with:
files: "E5Renewer-*.7z"
generate_release_notes: true