Add a failover for values under or equal to zero #24
Workflow file for this run
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: Compile Mod | |
on: | |
release: | |
types: | |
- created | |
push: | |
pull_request: | |
jobs: | |
lint-and-compile: | |
strategy: | |
matrix: | |
configuration: [Debug, Release] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2.1.0 | |
with: | |
dotnet-version: "6.0.x" | |
- name: Restore NuGet Packages | |
run: dotnet restore ${{ github.event.repository.name }}.sln | |
- name: Patch csproj version | |
uses: justalemon/VersionPatcher@v0.4 | |
with: | |
version: 1.2.2.${{ github.run_number }} | |
use-tag: true | |
csproj-files: "**/**.csproj" | |
- name: Compile | |
working-directory: ${{ env.GITHUB_WORKSPACE }} | |
run: dotnet build ${{ github.event.repository.name }}.sln -c ${{ matrix.configuration }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }}.${{ matrix.configuration }} | |
path: bin/${{ matrix.configuration }} | |
deploy: | |
runs-on: ubuntu-22.04 | |
if: ${{ github.event_name == 'release' }} | |
needs: | |
- lint-and-compile | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2.1.0 | |
with: | |
dotnet-version: "6.0.x" | |
- name: Download the Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }}.Release | |
path: bin/Release | |
- name: Repackage Files | |
run: 7z a ${{ github.event.repository.name }}.zip ${{ github.workspace }}/bin/Release/* | |
- name: Create Release | |
uses: ncipollo/release-action@v1.10.0 | |
with: | |
allowUpdates: true | |
artifactErrorsFailBuild: true | |
artifacts: ${{ github.event.repository.name }}.zip | |
omitBodyDuringUpdate: true | |
omitDraftDuringUpdate: true | |
omitNameDuringUpdate: true | |
omitPrereleaseDuringUpdate: true |