Skip to content

Commit

Permalink
Fix build to support ubuntu-latest
Browse files Browse the repository at this point in the history
  • Loading branch information
PrincessMadMath committed Dec 18, 2024
1 parent ef7bb40 commit 86c61e6
Showing 5 changed files with 24 additions and 8 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ name: CI
on:
pull_request:
branches: ["main"]
paths-ignore: ["*.md"]

push:
branches:
@@ -14,19 +15,32 @@ concurrency:
cancel-in-progress: true

jobs:
main:
runs-on: ubuntu-latest
ci:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v4

- uses: actions/setup-dotnet@v4
with:
dotnet-version: "6.0.x"
source-url: ${{ secrets.NUGET_GSOFTDEV_FEED_URL }}
env:
NUGET_AUTH_TOKEN: ${{ secrets.GSOFT_NUGET_API_KEY }}

- run: ./Build.ps1
shell: pwsh
env:
NUGET_SOURCE: ${{ secrets.NUGET_GSOFTDEV_FEED_URL }}
NUGET_API_KEY: ${{ secrets.GSOFT_NUGET_API_KEY }}

linearb:
needs: [ci]
uses: gsoft-inc/wl-reusable-workflows/.github/workflows/linearb-deployment.yml@main
with:
environment: development
secrets: inherit
2 changes: 1 addition & 1 deletion Build.ps1
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ Process {
Exec { & dotnet test -c Release --no-build --results-directory "$outputDir" --no-restore -l "trx" -l "console;verbosity=detailed" }
Exec { & dotnet pack -c Release --no-build -o "$outputDir" }

if (($null -ne $env:NUGET_SOURCE ) -and ($null -ne $env:NUGET_API_KEY)) {
if (($null -ne $env:NUGET_SOURCE) -and ($null -ne $env:NUGET_API_KEY) -and ($IsLinux)) {
Exec { & dotnet nuget push "$nupkgsPath" -s $env:NUGET_SOURCE -k $env:NUGET_API_KEY --skip-duplicate }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(TargetFramework);net462</TargetFrameworks>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<SignAssembly>true</SignAssembly>
1 change: 1 addition & 0 deletions src/Workleap.Extensions.Configuration.Substitution.sln
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "files", "files", "{34567226
Directory.Build.props = Directory.Build.props
.editorconfig = .editorconfig
..\README.md = ..\README.md
..\global.json = ..\global.json
EndProjectSection
EndProject
Global
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0;</TargetFrameworks>
<TargetFrameworks>net8.0;netstandard2.0;</TargetFrameworks>
<IsPackable>True</IsPackable>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

0 comments on commit 86c61e6

Please sign in to comment.