Skip to content

Rel0.0.2

Rel0.0.2 #42

Workflow file for this run

name: Build ConGui for Win&Linux
on:
#push:
# branches: [ main ]
#pull_request:
# branches: [ main ]
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
kind: ['linux', 'windows']
include:
- kind: linux
os: ubuntu-latest
target: linux-x64
options: /p:PublishProfile="FolderProfile1"
- kind: windows
os: windows-latest
target: win-x64
options: /p:PublishProfile="FolderProfile"
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: build with publish profile
run: dotnet publish ConGui/ConGui.csproj ${{matrix.options}}
- name: Zip published dir
shell: bash
run: |
tag=$(git describe --tags --abbrev=0)
release_name="App-$tag-${{ matrix.target }}"
cd ConGui/bin/Release/net8.0/publish/
# Build everything
# dotnet publish ConGui/ConGui.csproj --framework net7.0 --self-contained --runtime "${{ matrix.target }}" -c Release -o "$release_name" "${{ matrix.options }}"
# Pack files
if [ "${{ matrix.target }}" == "win-x64" ]; then
# Pack to zip for Windows
dir
7z a -tzip "${release_name}.zip" "./win/*"
else
ls
tar czvf "${release_name}.tar.gz" "lux"
fi
- uses: actions/upload-artifact@v3
with:
name: dev-build
path: ConGui/bin/Release/net8.0/publish/App*
- name: make release
if: github.event_name == 'release' && github.event.action == 'published'
uses: softprops/action-gh-release@v1
with:
files: "ConGui/bin/Release/net8.0/publish/App*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}