Readme udpate #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Restore dependencies | |
run: dotnet restore | |
- name: Build self-contained app | |
run: dotnet publish --configuration Release -r ${{ matrix.rid }} --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=true | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ChatAAC-${{ matrix.os }} | |
path: ./bin/Release/net8.0/${{ matrix.rid }}/publish/ | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Download build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: ChatAAC-ubuntu-latest | |
if: matrix.os == 'ubuntu-latest' | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ChatAAC-windows-latest | |
if: matrix.os == 'windows-latest' | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ChatAAC-macos-latest | |
if: matrix.os == 'macos-latest' | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: 'v1.0' | |
release_name: 'ChatAAC v1.0' | |
body: | | |
# ChatAAC v1.0.${{ github.run_number }} | |
Download the application for your platform: | |
- [Linux](https://github.com/${{ github.repository }}/releases/download/v1.0/ChatAAC-linux-x64) | |
- [Windows](https://github.com/${{ github.repository }}/releases/download/v1.0/ChatAAC-windows-x64.exe) | |
- [macOS](https://github.com/${{ github.repository }}/releases/download/v1.0/ChatAAC-macos-x64) | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset (Linux) | |
uses: actions/upload-release-asset@v1 | |
if: matrix.os == 'ubuntu-latest' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./bin/Release/net8.0/linux-x64/publish/ChatAAC | |
asset_name: ChatAAC-linux-x64 | |
asset_content_type: application/octet-stream | |
- name: Upload Release Asset (Windows) | |
uses: actions/upload-release-asset@v1 | |
if: matrix.os == 'windows-latest' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./bin/Release/net8.0/win-x64/publish/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 | |
if: matrix.os == 'macos-latest' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./bin/Release/net8.0/osx-x64/publish/ChatAAC | |
asset_name: ChatAAC-macos-x64 | |
asset_content_type: application/octet-stream |