forked from growthbook/growthbook-c-sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: added ci builds, tests, and deploys
- Loading branch information
1 parent
50bcbc4
commit 0d72e72
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: dotnet package | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
# set value | ||
SHOULD_DEPLOY: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | ||
strategy: | ||
matrix: | ||
dotnet-version: ["3.1.x", "6.0.x", "7.0.x"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup dotnet ${{ matrix.dotnet-version }} | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ matrix.dotnet-version }} | ||
|
||
- name: Restore | ||
run: dotnet restore GrowthBook/GrowthBook.csproj | ||
|
||
- name: Build | ||
run: dotnet build GrowthBook/GrowthBook.csproj --configuration Release | ||
|
||
# current tests are written for visual studio only | ||
# - name: Test | ||
# run: dotnet test Test/Growthook.Tests.csproj --configuration Release --no-build | ||
|
||
- name: pack | ||
run: dotnet pack --configuration Release --no-build --output dist GrowthBook/GrowthBook.csproj | ||
|
||
# # Deploy if SHOULD_DEPLOY is set to true | ||
# - name: publish | ||
# if: ${{ env.SHOULD_DEPLOY }} | ||
# run: dotnet nuget push dist/*.nupkg --api-key $NUGET_KEY --source $NUGET_SOURCE | ||
# env: | ||
# NUGET_KEY: ${{ secrets.NUGET_KEY }} | ||
# NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }} |
File renamed without changes.