Skip to content

feat: threads option #20

feat: threads option

feat: threads option #20

name: Build Artifact
on:
push:
branches: [master]
paths-ignore:
- "**.md"
- ".github/**"
- "assets/**"
pull_request:
branches: [master]
workflow_call:
outputs:
version:
description: "Version builded"
value: ${{ jobs.build.outputs.version }}
jobs:
build:
name: Build
strategy:
matrix:
profile: [win, linux]
runs-on: windows-latest
env:
DOTNET_NOLOGO: true
PROFILE: ${{ matrix.profile }}
outputs:
version: ${{steps.version.outputs.version}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.x
- name: Set VERSION
id: version
run: .\.github\scripts\version.ps1
- name: Restore cache
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Build solution
run: |
dotnet restore --locked-mode
dotnet build -c Release
- name: Build artifact
run: dotnet publish -c Release -p:PublishProfile=$env:PROFILE /property:Version=$env:VERSION
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: DynmapImageExport(${{ matrix.profile }})
path: |
DynmapImageExport\publish\${{ matrix.profile }}\**
if-no-files-found: error