3.1.1 #11
Workflow file for this run
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
name: Publish Nuget Package | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
publish-nuget: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .Net Core | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Install Dependencies | |
run: dotnet restore | |
- name: Build | |
working-directory: ./smartsheet-csharp-sdk | |
run: dotnet build --configuration Release --no-restore | |
- name: Clone smartsheet/smartsheet-sdk-tests PRIVATE repository | |
uses: GuillaumeFalourd/clone-github-repo-action@v2 | |
with: | |
owner: 'smartsheet' | |
repository: 'smartsheet-sdk-tests' | |
access-token: ${{ secrets.SDK_TEST_ACCESS_TOKEN }} | |
- name: Setup Mock API | |
run: | | |
smartsheet-sdk-tests/ci_scripts/install_wiremock.sh | |
smartsheet-sdk-tests/ci_scripts/start_wiremock.sh | |
- name: Run Mock API Tests | |
working-directory: ./mock-api-test-sdk-net60 | |
run: | | |
dotnet build --configuration Release --no-restore | |
dotnet test --no-restore | |
- name: Run Integration Tests | |
continue-on-error: true | |
working-directory: ./integration-test-sdk-net60 | |
env: | |
SMARTSHEET_ACCESS_TOKEN: ${{secrets.SMARTSHEET_ACCESS_TOKEN}} | |
run: | | |
dotnet build --configuration Release --no-restore | |
dotnet test --no-restore | |
- name: Package | |
working-directory: ./smartsheet-csharp-sdk | |
run: dotnet pack smartsheet-csharp-sdk-v2.csproj --no-build --configuration Release --include-symbols -p:SymbolPackageFormat=snupkg -o . | |
- name: Publish to Nuget | |
working-directory: ./smartsheet-csharp-sdk | |
run: dotnet nuget push *.nupkg --api-key ${{secrets.NUGET_TOKEN}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate |