Skip to content

Commit

Permalink
Switch to PackOnBuild=true and remove pack step
Browse files Browse the repository at this point in the history
This simplifies the workflows
  • Loading branch information
kzu committed Jan 30, 2024
1 parent c7d60aa commit 0c8c73d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ env:
DOTNET_NOLOGO: true
VersionPrefix: 42.42.${{ github.run_number }}
VersionLabel: ${{ github.ref }}
PackOnBuild: true
GeneratePackageOnBuild: true

defaults:
run:
Expand Down Expand Up @@ -67,11 +69,6 @@ jobs:
- name: 🧪 test
uses: ./.github/workflows/test

- name: 📦 pack
run: |
dotnet build -m:1
dotnet pack --no-build -m:1
# Only push CI package to sleet feed if building on ubuntu (fastest)
- name: 🚀 sleet
env:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
env:
DOTNET_NOLOGO: true
Configuration: Release
PackOnBuild: true
GeneratePackageOnBuild: true

jobs:
publish:
Expand All @@ -27,10 +29,5 @@ jobs:
- name: 🧪 test
uses: ./.github/workflows/test

- name: 📦 pack
run: |
dotnet build -m:1 -p:version=${GITHUB_REF#refs/*/v}
dotnet pack -m:1 -p:version=${GITHUB_REF#refs/*/v}
- name: 🚀 nuget
run: dotnet nuget push ./bin/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
1 change: 1 addition & 0 deletions ThisAssembly.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
ProjectSection(SolutionItems) = preProject
.github\workflows\build.yml = .github\workflows\build.yml
.github\dependabot.yml = .github\dependabot.yml
.github\workflows\publish.yml = .github\workflows\publish.yml
.github\workflows\release.yml = .github\workflows\release.yml
.github\workflows\tag.yml = .github\workflows\tag.yml
EndProjectSection
Expand Down

0 comments on commit 0c8c73d

Please sign in to comment.