Skip to content

Commit 4852aae

Browse files
committed
build and pack combined
1 parent 2823618 commit 4852aae

1 file changed

Lines changed: 5 additions & 37 deletions

File tree

.github/workflows/dotnet-desktop.yml

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ env:
1414
NUGET_SOURCE_URL: https://api.nuget.org/v3/index.json
1515

1616
jobs:
17-
build:
18-
name: Build Solution
17+
build-and-pack:
18+
name: Build and Package
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4
@@ -29,45 +29,13 @@ jobs:
2929
run: dotnet restore ${{ env.SOLUTION_PATH }}
3030

3131
- name: Build
32-
run: dotnet build ${{ env.SOLUTION_PATH }} --configuration Release --no-restore
33-
34-
- name: Upload build artifacts
35-
uses: actions/upload-artifact@v4
36-
with:
37-
name: build-output
38-
path: SimpleMapper/**/bin/Release/
39-
if-no-files-found: error
40-
41-
pack:
42-
name: Package NuGet
43-
needs: build
44-
runs-on: ubuntu-latest
45-
steps:
46-
- uses: actions/checkout@v4
47-
48-
- name: Setup .NET
49-
uses: actions/setup-dotnet@v3
50-
with:
51-
dotnet-version: 8.0.x
52-
53-
- name: Restore dependencies
54-
run: dotnet restore ${{ env.SOLUTION_PATH }}
55-
56-
- name: Debug paths
57-
run: |
58-
echo "Solution path: ${{ env.SOLUTION_PATH }}"
59-
echo "Package project path: ${{ env.PACKAGE_PROJECT_PATH }}"
60-
echo "Package output directory: ${{ env.PACKAGE_OUTPUT_DIRECTORY }}"
61-
ls -la SimpleMapper/SimpleMapper/ || echo "Directory not found"
32+
run: dotnet build ${{ env.SOLUTION_PATH }} --configuration Release
6233

6334
- name: Create output directory
6435
run: mkdir -p ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
6536

6637
- name: Pack
67-
run: |
68-
dotnet pack ${{ env.PACKAGE_PROJECT_PATH }} \
69-
--configuration Release \
70-
--output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
38+
run: dotnet pack ${{ env.PACKAGE_PROJECT_PATH }} --configuration Release --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
7139

7240
- name: Upload package artifacts
7341
uses: actions/upload-artifact@v4
@@ -78,7 +46,7 @@ jobs:
7846

7947
publish:
8048
name: Publish to NuGet
81-
needs: pack
49+
needs: build-and-pack
8250
runs-on: ubuntu-latest
8351
if: startsWith(github.ref, 'refs/tags/v') # only on tag pushes
8452
steps:

0 commit comments

Comments
 (0)