generated from MrSphay/codex-agent-repository-kit
59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
name: Build MrTrust
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: 8.0.x
|
|
|
|
- name: Build Windows EXE
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
version="0.1.2"
|
|
dotnet publish src/MrTrustLauncher.csproj \
|
|
--configuration Release \
|
|
--runtime win-x64 \
|
|
--output dist/build \
|
|
-p:EnableWindowsTargeting=true \
|
|
-p:PublishSingleFile=true \
|
|
-p:SelfContained=true
|
|
cp dist/build/MrTrust.exe dist/MrTrust.exe
|
|
|
|
- name: Build release ZIP
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
version="0.1.2"
|
|
package_root="dist/MrTrust-${version}"
|
|
rm -rf "$package_root" "dist/MrTrust-${version}.zip"
|
|
mkdir -p "$package_root"
|
|
cp dist/MrTrust.exe "$package_root/"
|
|
cp README.md "$package_root/"
|
|
(cd dist && zip -r "MrTrust-${version}.zip" "MrTrust-${version}")
|
|
|
|
- name: Show package contents
|
|
shell: bash
|
|
run: |
|
|
find dist -maxdepth 4 -type f -printf '%p %s bytes\n'
|
|
|
|
- name: Upload release artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: MrTrust-0.1.2
|
|
path: dist/MrTrust-0.1.2.zip
|