Merge pull request #16 from boriel-basic/releases/v.1.6.0-beta1 #7
This file contains hidden or 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 .NET project | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install .NET 8 | |
run: | | |
curl -Lo dotnet.tar.gz https://download.visualstudio.microsoft.com/download/pr/a91ddad4-a3c2-4303-9efc-1ca6b7af850c/be1763df9211599df1cf1c6f504b3c41/dotnet-sdk-8.0.405-linux-x64.tar.gz | |
mkdir dotnet | |
tar -C dotnet -xf dotnet.tar.gz | |
rm dotnet.tar.gz | |
echo DOTNET_ROOT=~/dotnet >> $GITHUB_ENV | |
echo PATH=$PATH:~/dotnet >> $GITHUB_ENV | |
- name: Show version | |
run: dotnet --version | |
- name: Clean build artifacts | |
run: dotnet restore | |
- name: Build project | |
run: dotnet build ZXBasicStudio.sln --configuration Release --no-restore | |
- name: Publish for Linux | |
run: | | |
dotnet publish ZXBStudio/ZXBasicStudio.csproj -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -o out | |
- name: Publish for Windows | |
run: | | |
dotnet publish ZXBStudio/ZXBasicStudio.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -o out-win | |
- name: Publish for Mac | |
run: | | |
dotnet publish ZXBStudio/ZXBasicStudio.csproj -c Release -r osx-x64 --self-contained true -p:PublishSingleFile=true -o out-mac | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ZXBasicStudio-linux-x64 | |
path: ~/work/ZXBasicStudio/ZXBasicStudio/out/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ZXBasicStudio-win-x64 | |
path: ~/work/ZXBasicStudio/ZXBasicStudio/out-win/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ZXBasicStudio-osx-x64 | |
path: ~/work/ZXBasicStudio/ZXBasicStudio/out-mac/ | |