Skip to content

CsvImporter / Create artifacts #18

CsvImporter / Create artifacts

CsvImporter / Create artifacts #18

# 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 publish ./src/Tools/CsvImporter/ --configuration "Release" --runtime "win-x64" --output "./build/CsvImporter/"
- name: Compile project (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
dotnet publish ./src/Tools/CsvImporter/ --configuration "Release" --runtime "linux-x64" --output "./build/CsvImporter/"
- name: List files
shell: pwsh
run: |
Get-ChildItem -Path "${{ github.workspace }}/build/" -Recurse | ForEach-Object { "$($PSItem.FullName)" }
- name: Create artifact (Windows)
uses: actions/upload-artifact@v4
if: ${{ runner.os == 'Windows' }}
with:
name: "CsvImporter_win-x64_${{ github.sha }}"
path: ${{ github.workspace }}/build/CsvImporter/**/*
if-no-files-found: error
- name: Create artifact (Linux)
uses: actions/upload-artifact@v4
if: ${{ runner.os == 'Linux' }}
with:
name: "CsvImporter_linux-x64_${{ github.sha }}"
path: ${{ github.workspace }}/build/CsvImporter/**/*
if-no-files-found: error