Merge branch 'release/2.8.3' #192
Workflow file for this run
This file contains hidden or 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: Build and Push to Nuget | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dotnet-version: [8.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Start Gotenberg with Basic Auth | |
run: | | |
docker run -d \ | |
--name gotenberg \ | |
-p 3000:3000 \ | |
-e GOTENBERG_API_BASIC_AUTH_USERNAME=testuser \ | |
-e GOTENBERG_API_BASIC_AUTH_PASSWORD=testpass \ | |
gotenberg/gotenberg:8 \ | |
gotenberg \ | |
--api-enable-basic-auth \ | |
--api-timeout=1800s \ | |
--log-level=debug | |
# Wait for Gotenberg to be ready | |
timeout 30 bash -c 'until curl -f http://localhost:3000/health; do sleep 1; done' | |
- name: Setup Dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v4.1.0 | |
with: | |
versionSpec: '6.x' | |
- name: GitVersion | |
id: gitversion | |
uses: gittools/actions/gitversion/execute@v4.1.0 | |
with: | |
configFilePath: GitVersion.yml | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore -c Release | |
- name: Run tests | |
run: dotnet test --no-build -c Release --verbosity normal | |
env: | |
GOTENBERG_URL: http://localhost:3000 | |
GOTENBERG_USERNAME: testuser | |
GOTENBERG_PASSWORD: testpass | |
- name: Pack | |
run: dotnet pack src/Gotenberg.Sharp.Api.Client/Gotenberg.Sharp.Api.Client.csproj -c Release -p:PackageVersion=${{ steps.gitversion.outputs.FullSemVer }} -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg | |
- name: Publish | |
if: github.event_name != 'pull_request' && (github.ref_name == 'master') | |
run: dotnet nuget push src/Gotenberg.Sharp.Api.Client/bin/Release/*.nupkg --source 'https://api.nuget.org/v3/index.json' -k ${{ secrets.NUGETKEY }} --skip-duplicate |