Skip to content

Commit a2f3fa7

Browse files
authored
Merge pull request #10 from asynkron/validate-pack-workflow
Validate tag pack workflow in CI
2 parents a57c2b8 + a375c8e commit a2f3fa7

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,27 @@ jobs:
1414
- name: Setup .NET
1515
uses: actions/setup-dotnet@v4
1616
with:
17-
dotnet-version: '10.0.x'
18-
dotnet-quality: 'preview'
17+
global-json-file: global.json
1918
- name: Restore
2019
run: dotnet restore
2120
- name: Build
2221
run: dotnet build -c Release --nologo
2322
- name: Test
2423
run: dotnet test -c Release --nologo
24+
25+
pack-validate:
26+
runs-on: ubuntu-latest
27+
needs: build
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Setup .NET
31+
uses: actions/setup-dotnet@v4
32+
with:
33+
global-json-file: global.json
34+
- name: Pack (dry run)
35+
run: |
36+
VERSION="0.0.0-ci.${GITHUB_RUN_NUMBER}"
37+
dotnet pack -c Release -o ./nupkg src/ProfileTool/ProfileTool.csproj -p:Version="$VERSION"
38+
dotnet pack -c Release -o ./nupkg src/ProfilerCore/Asynkron.Profiler.Core.csproj -p:Version="$VERSION"
39+
test -f "./nupkg/asynkron-profiler.$VERSION.nupkg"
40+
test -f "./nupkg/Asynkron.Profiler.Core.$VERSION.nupkg"

.github/workflows/pack.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ jobs:
1313
- name: Setup .NET
1414
uses: actions/setup-dotnet@v4
1515
with:
16-
dotnet-version: '10.0.x'
17-
dotnet-quality: 'preview'
16+
global-json-file: global.json
1817
- name: Pack
1918
run: |
2019
VERSION="${GITHUB_REF_NAME#v}"

0 commit comments

Comments
 (0)