Skip to content

Lot of changes in loading boards #28

Lot of changes in loading boards

Lot of changes in loading boards #28

name: Build and Release ChatAAC
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
rid: linux-x64
- os: macos-latest
rid: osx-x64
- os: windows-latest
rid: win-x64
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Check .NET version
run: dotnet --version
- name: Restore dependencies
run: dotnet restore
- name: Build project
run: dotnet build --configuration Release
- name: Publish self-contained app
run: dotnet publish --configuration Release -r ${{ matrix.rid }} --self-contained -o ./publish
- name: List contents of publish directory
shell: pwsh
run: |
if ($IsWindows) {
Get-ChildItem -Path publish -Recurse
} else {
ls -R publish
}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ChatAAC-${{ matrix.os }}
path: publish/
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Display structure of downloaded files
run: ls -R artifacts
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.0.${{ github.run_number }}
release_name: ChatAAC v1.0.${{ github.run_number }}
body: |
# ChatAAC v1.0.${{ github.run_number }}
Download the application for your platform:
- [Linux](https://github.com/${{ github.repository }}/releases/download/v1.0.${{ github.run_number }}/ChatAAC-linux-x64)
- [Windows](https://github.com/${{ github.repository }}/releases/download/v1.0.${{ github.run_number }}/ChatAAC-windows-x64.exe)
- [macOS](https://github.com/${{ github.repository }}/releases/download/v1.0.${{ github.run_number }}/ChatAAC-macos-x64)
draft: false
prerelease: false
- name: Upload Release Asset (Linux)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/ChatAAC-ubuntu-latest/ChatAAC
asset_name: ChatAAC-linux-x64
asset_content_type: application/octet-stream
- name: Upload Release Asset (Windows)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/ChatAAC-windows-latest/ChatAAC.exe
asset_name: ChatAAC-windows-x64.exe
asset_content_type: application/octet-stream
- name: Upload Release Asset (macOS)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./artifacts/ChatAAC-macos-latest/ChatAAC
asset_name: ChatAAC-macos-x64
asset_content_type: application/octet-stream