-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (59 loc) · 2.57 KB
/
csvimporter-create-artifacts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# 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: ${{ 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' }}
shell: pwsh
run: |
dotnet publish ./src/Tools/CsvImporter/ --configuration "Release" --runtime "win-x64";
Remove-Item -Path "./artifacts/publish/CsvImporter/release_win-x64/*.pdb" -Recurse -Force -Verbose
- name: Compile project (Linux)
if: ${{ runner.os == 'Linux' }}
shell: pwsh
run: |
dotnet publish ./src/Tools/CsvImporter/ --configuration "Release" --runtime "linux-x64";
Remove-Item -Path "./artifacts/publish/CsvImporter/release_linux-x64/*.pdb" -Recurse -Force -Verbose;
Remove-Item -Path "./artifacts/publish/CsvImporter/release_linux-x64/*.dbg" -Recurse -Force -Verbose
- name: Create artifact (Windows)
uses: actions/upload-artifact@v4
if: ${{ runner.os == 'Windows' }}
with:
name: "CsvImporter_win-x64_${{ github.ref_type == 'tag' && github.ref_name || github.sha }}"
path: ${{ github.workspace }}/artifacts/publish/CsvImporter/release_win-x64/**/*
if-no-files-found: error
- name: Create artifact (Linux)
uses: actions/upload-artifact@v4
if: ${{ runner.os == 'Linux' }}
with:
name: "CsvImporter_linux-x64_${{ github.ref_type == 'tag' && github.ref_name || github.sha }}"
path: ${{ github.workspace }}/artifacts/publish/CsvImporter/release_linux-x64/**/*
if-no-files-found: error