Skip to content

Update releaseV2.yml #13

Update releaseV2.yml

Update releaseV2.yml #13

Workflow file for this run

name: Publish to NuGet
on:
release:
types: [published]
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0'
- name: Get version from release
id: get_version
run: echo "##[set-output name=VERSION;]${{ github.event.release.tag_name }}"
- name: Set version in .csproj
run: |
sed -i 's/<Version>.*<\/Version>/<Version>${{ steps.get_version.outputs.VERSION }}<\/Version>/g' **/*.csproj
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Run tests
run: dotnet test --no-restore --verbosity normal --filter "FullyQualifiedName!=Tests.Edit.SignTests.Sign_RequestSignature_ShouldProccessOk&FullyQualifiedName!=Tests.Edit.SignTests.Sign_ComplexTest_ShouldProcessOk"
- name: Pack the project
run: dotnet pack --configuration Release ./src/ILovePDF/iLovePDF.csproj --output ./nupkg
- name: Publish to NuGet
env:
run: dotnet nuget push "*src/**/*.nupkg" --api-key ${{secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json