Skip to content

Commit

Permalink
ci: added ci builds, tests, and deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
Mastermindzh committed Oct 28, 2023
1 parent 50bcbc4 commit 0d72e72
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
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.

0 comments on commit 0d72e72

Please sign in to comment.