CsvImporter / Create artifacts #9
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow | |
name: CsvImporter / Create artifacts | |
on: | |
workflow_dispatch: | |
permissions: | |
packages: read | |
jobs: | |
create-artifacts: | |
name: Create artifacts | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest ] | |
env: | |
DOTNET_NOLOGO: true | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: Install .NET tools | |
run: dotnet tool restore | |
- name: Update project files with GitVersion | |
run: dotnet tool run dotnet-gitversion /updateprojectfiles | |
- name: Compile project (Windows) | |
if: ${{ runner.os == 'Windows' }} | |
run: | | |
dotnet msbuild ./src/Tools/CsvImporter/ -target:"Restore" -target:"Build" -target:"Publish" -property:"Configuration=Release" -property:"RuntimeIdentifier=win-x64" -property:"EnableBuildOutDir=true" -property:"EnableArtifactZip=false" | |
- name: Compile project (Linux) | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
dotnet msbuild ./src/Tools/CsvImporter/ -target:"Restore" -target:"Build" -target:"Publish" -property:"Configuration=Release" -property:"RuntimeIdentifier=linux-x64" -property:"EnableBuildOutDir=true" -property:"EnableArtifactZip=false" | |
- name: Create artifact (Windows) | |
uses: actions/upload-artifact@v4 | |
if: ${{ runner.os == 'Windows' }} | |
with: | |
name: "CsvImporter_win-x64_${{ github.sha }}" | |
path: build/CsvImporter/**/* | |
- name: Create artifact (Linux) | |
uses: actions/upload-artifact@v4 | |
if: ${{ runner.os == 'Linux' }} | |
with: | |
name: "CsvImporter_linux-x64_${{ github.sha }}" | |
path: build/CsvImporter/**/* |