Skip to content

Support multiple property matching implementations #18

Support multiple property matching implementations

Support multiple property matching implementations #18

Workflow file for this run

name: Build
on:
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
push:
branches: [main]
# Trigger the workflow on any pull request
pull_request:
workflow_call:
inputs:
ref:
description: "A tag reference passed from Publish workflow"
default: ${{ github.sha }}
required: false
type: string
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
fetch-depth: 0
filter: tree:0
- name: Setup .NET environment
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.100"
- name: Install Evaisa's netcode-patcher
run: |
dotnet tool install -g Evaisa.NetcodePatcher.Cli
- name: Restore project
run: |
dotnet restore
dotnet tool restore
- name: Build and pack solution
run: |
dotnet pack -c Release
- name: Set MOD_NAME environment variable
run: echo "MOD_NAME=$(cat ./*/dist/name.txt )" >> $GITHUB_ENV
- name: Set MOD_VERSION environment variable
run: echo "MOD_VERSION=$(cat ./*/dist/version.txt )" >> $GITHUB_ENV
- name: Set ZIP_PATH environment variable
run: echo "ZIP_PATH=./${{ env.MOD_NAME }}/dist/curseforge.zip" >> $GITHUB_ENV
- name: Upload CurseForge artifact
uses: actions/upload-artifact@v4
with:
name: curseforge-build
path: ./*/dist/*.zip
- name: Upload Thunderstore artifact
uses: actions/upload-artifact@v4
with:
name: thunderstore-build
path: ./*/dist/*.zip
- name: Upload nupkg artifact
uses: actions/upload-artifact@v4
with:
name: nupkg-build
path: ./*/bin/Release/*.nupkg
- name: Upload Versions artifact
uses: actions/upload-artifact@v4
with:
name: versions
path: ./*/dist/*.txt