Skip to content

CsvImporter / Create artifacts #38

CsvImporter / Create artifacts

CsvImporter / Create artifacts #38

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: CsvImporter / Create artifacts
on:
push:
tags:
- "v*.*.*"
- "v*.*.*-*"
workflow_dispatch:
permissions:
packages: read
jobs:
create-artifacts:
name: Create artifacts
runs-on: ubuntu-latest
strategy:
matrix:
runtime-identifier: [ linux-x64, linux-arm64, win-x64, win-arm64, osx-x64, osx-arm64 ]
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
shell: pwsh
run: |
dotnet publish ./src/Tools/CsvImporter/ --configuration "Release" --runtime "${{ matrix.runtime-identifier }}";
Remove-Item -Path "./artifacts/publish/CsvImporter/release_${{ matrix.runtime-identifier }}/*.pdb" -Recurse -Force -Verbose;
Remove-Item -Path "./artifacts/publish/CsvImporter/release_${{ matrix.runtime-identifier }}/*.dbg" -Recurse -Force -Verbose;
Remove-Item -Path "./artifacts/publish/CsvImporter/release_${{ matrix.runtime-identifier }}/*.dsym" -Recurse -Force -Verbose;
dotnet publish ./src/Tools/CsvImporter.ConfigTool/ --configuration "Release" --runtime "${{ matrix.runtime-identifier }}";
Remove-Item -Path "./artifacts/publish/CsvImporter.ConfigTool/release_${{ matrix.runtime-identifier }}/*.pdb" -Recurse -Force -Verbose;
Remove-Item -Path "./artifacts/publish/CsvImporter.ConfigTool/release_${{ matrix.runtime-identifier }}/*.dbg" -Recurse -Force -Verbose;
Remove-Item -Path "./artifacts/publish/CsvImporter.ConfigTool/release_${{ matrix.runtime-identifier }}/*.dsym" -Recurse -Force -Verbose;
Remove-Item -Path "./artifacts/publish/CsvImporter.ConfigTool/release_${{ matrix.runtime-identifier }}/*.dll" -Recurse -Force -Verbose;
Remove-Item -Path "./artifacts/publish/CsvImporter.ConfigTool/release_${{ matrix.runtime-identifier }}/*.dylib" -Recurse -Force -Verbose;
Remove-Item -Path "./artifacts/publish/CsvImporter.ConfigTool/release_${{ matrix.runtime-identifier }}/*.so" -Recurse -Force -Verbose;
Copy-Item -Path "./artifacts/publish/CsvImporter.ConfigTool/release_${{ matrix.runtime-identifier }}/*" -Destination "./artifacts/publish/CsvImporter/release_${{ matrix.runtime-identifier }}/" -Force -Verbose;
- name: Create artifact
uses: actions/upload-artifact@v4
with:
name: "CsvImporter_${{ matrix.runtime-identifier }}_${{ github.ref_type == 'tag' && github.ref_name || github.sha }}"
path: ${{ github.workspace }}/artifacts/publish/CsvImporter/release_${{ matrix.runtime-identifier }}/**/*
if-no-files-found: error