This repository has been archived by the owner on Apr 23, 2023. It is now read-only.
Created better cross-platform release action #72
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: Yak Build | |
on: | |
pull_request: | |
paths-ignore: | |
- '*.md' | |
- '*.gh*' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup NuGet | |
uses: NuGet/setup-nuget@v1 | |
- name: Restore Packages | |
run: nuget restore Crash.sln | |
- name: Setup .NET Core 6.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0 | |
- uses: FranzDiebold/github-env-vars-action@v2 | |
- name: Set Framework Env Variable (Windows) | |
if : ${{ matrix.os == 'windows-latest' }} | |
run: | | |
echo "FRAMEWORK=net48" | |
- name: Set Framework Env Variable (Unix) | |
if : ${{ matrix.os != 'windows-latest' }} | |
run: | | |
echo "FRAMEWORK=net7.0" | |
- name: Build Crash | |
run: dotnet build Crash.sln --configuration Release | |
- id: yak | |
uses: crashcloud/yak-publish@main | |
with: | |
package-name: 'Crash' | |
token: ${{ secrets.YAK_TOKEN }} | |
build-path: 'src/Crash/bin/Release/${{env.framework}}' | |
publish: 'test' | |
platform: ${{ matrix.os }} |