Merge pull request #20 from PikminGuts92/dev #98
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
on: [push, pull_request] | |
name: CI | |
jobs: | |
build: | |
name: Build (${{ matrix.osname }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macos-latest | |
osname: "osx-x64" | |
- os: ubuntu-latest | |
osname: "linux-x64" | |
- os: windows-latest | |
osname: "win-x64" | |
env: | |
ZIP_NAME: ${{ github.event.repository.name }}-ci-${{ github.sha }}-${{ matrix.osname }} | |
OUTPUT_PATH: ./build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.nuget/packages | |
Src/**/bin/*.* | |
Src/**/obj/*.* | |
Test/**/bin/*.* | |
Test/**/obj/*.* | |
key: ${{ matrix.osname }}-build-${{ hashFiles('**/*.csproj', './*.sln') }} | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Test projects | |
run: dotnet test | |
- name: Publish applications | |
shell: bash | |
run: | | |
chmod +x ./build.sh | |
./build.sh -r ${{ matrix.osname }} -o ${{ env.OUTPUT_PATH }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.ZIP_NAME }} | |
path: ${{ env.OUTPUT_PATH }} |