Skip to content

Commit

Permalink
Add workflow for creating an artifact of the CsvImporter tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Smalls1652 committed Jan 12, 2024
1 parent 8de3363 commit 4cf4dac
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/csvimporter-create-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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: [ 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 restore ./src/Tools/CsvImporter/
dotnet publish ./src/Tools/CsvImporter/ --configuration "Release" --runtime "win-x64" --output "../../../artifacts/CsvImporter"
- name: Compile project (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
dotnet restore ./src/Tools/CsvImporter/
dotnet publish ./src/Tools/CsvImporter/ --configuration "Release" --runtime "linux-x64" --output "../../../artifacts/CsvImporter"
- name: Create artifact
uses: actions/upload-artifact@v4
with:
name: "CsvImporter_${{ runner.os }}_${{ github.sha }}"
path: artifacts/CsvImporter

0 comments on commit 4cf4dac

Please sign in to comment.