Skip to content

Commit 33cb476

Browse files
authored
chore: add package CI job (#226)
* chore: add package CI job * fix: make package CI build before packing * chore: avoid full checkout for package job
1 parent 4fb2d7a commit 33cb476

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/main.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,36 @@ jobs:
4949
run: dotnet build --configuration Release --no-restore --nologo
5050
shell: bash
5151

52+
package:
53+
name: Package (${{ matrix.name }})
54+
runs-on: ubuntu-latest
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
include:
59+
- name: PostHog
60+
project: src/PostHog/PostHog.csproj
61+
- name: PostHog.AI
62+
project: src/PostHog.AI/PostHog.AI.csproj
63+
- name: PostHog.AspNetCore
64+
project: src/PostHog.AspNetCore/PostHog.AspNetCore.csproj
65+
steps:
66+
- name: Checkout main branch
67+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
68+
69+
- name: Setup .NET Core
70+
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
71+
with:
72+
dotnet-version: ${{ env.DOTNET_VERSION }}
73+
74+
- name: Restore NuGet Packages
75+
run: dotnet restore --locked-mode
76+
shell: bash
77+
78+
- name: Pack ${{ matrix.name }}
79+
run: dotnet pack "${{ matrix.project }}" --configuration Release --no-restore --nologo --output "${{ env.PackageDirectory }}" /p:GeneratePackageOnBuild=false
80+
shell: bash
81+
5282
test:
5383
name: Test
5484
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)