Skip to content

Fixes linter issues and simplifies implementation #53

Fixes linter issues and simplifies implementation

Fixes linter issues and simplifies implementation #53

Workflow file for this run

name: .NET Core
on:
push:
branches: [ main, release*, feature* ]
tags: [ v* ]
pull_request:
branches: [ main, release*, feature* ]
env:
ECLINT_VERSION: "0.3.3"
_JAVA_OPTIONS: "-Xms10m -Xmx1024m"
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
BUILD_ARTIFACTS_FOLDER: build_artifacts
steps:
- name: "[Setup] - Checkout code"
uses: actions/checkout@v3
with:
fetch-depth: 0 # Required for GitVersion
submodules: 'recursive'
- name: "[Setup] - Set HOME env variable (Windows)"
if: ${{ runner.os == 'Windows' }}
shell: pwsh
run: |
"HOME=${env:GITHUB_WORKSPACE}" >> $env:GITHUB_ENV
- name: "[Setup] - .NET Core"
uses: actions/setup-dotnet@v3
with:
global-json-file: ./global.json
- name: "[Setup] - Install GitVersion"
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.10.3'
- name: "[Setup] - Install Ruby"
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: "[Setup] - Install CycloneDX CLI (Windows)"
if: runner.os == 'Windows'
shell: pwsh
run: |
cd bin
Invoke-WebRequest -Uri https://github.com/CycloneDX/cyclonedx-cli/releases/download/v0.24.0/cyclonedx-win-x64.exe -OutFile cyclonedx.exe
"$env:GITHUB_WORKSPACE\bin" >> $env:GITHUB_PATH
- name: "[Setup] - Install CycloneDX CLI (Linux)"
if: runner.os != 'Windows'
run: |
cd bin
curl -LO https://github.com/CycloneDX/cyclonedx-cli/releases/download/v0.24.0/cyclonedx-linux-x64
chmod a+x cyclonedx-linux-x64
mv cyclonedx-linux-x64 cyclonedx
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: "[Setup] - Install CycloneDX dotnet as a global tool"
run: |
dotnet tool install --global CycloneDX
echo "$GITHUB_WORKSPACE/.dotnet/tools" >> $GITHUB_PATH
- name: "[Setup] - Set HOME env variable (Windows)"
if: ${{ runner.os == 'Windows' }}
shell: pwsh
run: |
"HOME=${env:GITHUB_WORKSPACE}" >> $env:GITHUB_ENV
- name: "[Versioning] - GitVersion Config"
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
additionalArguments: '/showConfig'
- name: "[Versioning] - Determine Version"
uses: gittools/actions/gitversion/[email protected]
id: gitversion
with:
useConfigFile: true
- name: "[Versioning] - Update csproj Files"
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
additionalArguments: '/updateprojectfiles'
- name: "[Versioning] - Display updated csproj File"
run: cat Corgibytes.Freshli.Agent.DotNet/Corgibytes.Freshli.Agent.DotNet.csproj
- name: "[Build]"
run: |
ruby bin/build.rb
- name: "[Test]"
run: |
ruby bin/test.rb