Skip to content

Initial MacOS build support #222

Initial MacOS build support

Initial MacOS build support #222

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: Build and Test
on:
push:
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
name: Build, Test, and Upload Builds (${{ matrix.os }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Set VERSION variable from tag
shell: bash
run: echo "VERSION=0.0.0" >> $GITHUB_ENV
- name: Publish for Linux x64
if: matrix.os == 'ubuntu-latest'
run: dotnet publish -c Release -r linux-x64 --self-contained Refresher /p:Version=${VERSION}
- name: Publish for Windows x64
if: matrix.os == 'windows-latest'
shell: bash
run: dotnet publish -c Release -r win-x64 --self-contained Refresher //p:Version=${VERSION}
- name: Publish for MacOS x64
if: matrix.os == 'macos-latest'
shell: bash
run: dotnet publish -c Release -r osx-x64 --self-contained Refresher //p:Version=${VERSION}
- name: Publish for MacOS ARM64
if: matrix.os == 'macos-latest'
shell: bash
run: dotnet publish -c Release -r osx-arm64 --self-contained Refresher //p:Version=${VERSION}
- name: Upload Linux x64 build
if: matrix.os == 'ubuntu-latest'
uses: actions/[email protected]
with:
name: "Refresher for Linux x64"
path: "Refresher/bin/Release/net8.0/linux-x64/publish/"
if-no-files-found: error
retention-days: 30
- name: Upload Windows x64 build
if: matrix.os == 'windows-latest'
uses: actions/[email protected]
with:
name: "Refresher for Windows x64"
path: "Refresher/bin/Release/net8.0-windows/win-x64/publish/"
if-no-files-found: error
retention-days: 30
- name: Upload MacOS x64 build
if: matrix.os == 'macos-latest'
uses: actions/[email protected]
with:
name: "Refresher for MacOS x64"
path: "Refresher/bin/Release/net8.0/osx-x64/publish/"
if-no-files-found: error
retention-days: 30
- name: Upload MacOS ARM64 build
if: matrix.os == 'macos-latest'
uses: actions/[email protected]
with:
name: "Refresher for MacOS ARM64"
path: "Refresher/bin/Release/net8.0/osx-arm64/publish/"
if-no-files-found: error
retention-days: 30