Skip to content

Commit

Permalink
build: use UseArtifactsOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
amis92 committed Jan 25, 2024
1 parent 06f4a71 commit 80b116c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
BuildConfiguration: [Release]
env:
DOTNET_NOLOGO: 1
Configuration: ${{ matrix.BuildConfiguration }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -21,9 +19,9 @@ jobs:
- run: dotnet restore -v m
- run: dotnet build --no-restore
- run: dotnet test --no-build
- run: dotnet pack --no-build
- run: dotnet pack
- name: Publish NuGet artifacts
uses: actions/upload-artifact@v4
with:
name: nugets-${{ runner.os }}
path: bin/Packages/${{ env.Configuration }}
path: artifacts/packages/release
5 changes: 2 additions & 3 deletions .github/workflows/deploy-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: 1
Configuration: Release
PUSH_TAG: ${{ github.event.client_payload.slash_command.args.unnamed.arg1 == 'tag' }}
steps:
- name: Add deployment run link to command comment
Expand All @@ -30,7 +29,7 @@ jobs:
- run: dotnet restore -v m
- run: dotnet build --no-restore
- run: dotnet test --no-build
- run: dotnet pack --no-build
- run: dotnet pack
- name: Add and push version tag
if: env.PUSH_TAG == 'true'
id: tagpush
Expand All @@ -52,7 +51,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: nugets
path: bin/Packages/${{ env.Configuration }}
path: artifacts/package/release
push:
runs-on: ubuntu-latest
needs: pack
Expand Down
4 changes: 1 addition & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@
<MainTargetFramework>net8.0</MainTargetFramework>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<ContinuousIntegrationBuild Condition=" '$(ContinuousIntegrationBuild)' == '' and '$(CI)' == 'true' ">true</ContinuousIntegrationBuild>
<UseArtifactsOutput>true</UseArtifactsOutput>
</PropertyGroup>

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<IsTestingOnlyProject>$(MSBuildProjectName.Contains('Test'))</IsTestingOnlyProject>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj/$(MSBuildProjectName)/</BaseIntermediateOutputPath>
<OutputPath>$(MSBuildThisFileDirectory)bin/$(MSBuildProjectName)/$(Configuration)/</OutputPath>
<PackageOutputPath>$(MSBuildThisFileDirectory)bin/Packages/$(Configuration)/</PackageOutputPath>
<NoWarn>$(NoWarn);CS1591;NU5105</NoWarn>
</PropertyGroup>

Expand Down

0 comments on commit 80b116c

Please sign in to comment.