Skip to content

Merge pull request #2050 from eliasbruvik/FIX-1899 #126

Merge pull request #2050 from eliasbruvik/FIX-1899

Merge pull request #2050 from eliasbruvik/FIX-1899 #126

Workflow file for this run

name: Package and publish
on:
push:
branches:
- main
paths:
- '.github/workflows/publish.yml'
- 'Src/Witsml/**'
workflow_dispatch:
permissions:
packages: read
jobs:
build:
name: Package and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Setup .NET 7
uses: actions/setup-dotnet@a351d9ea84bc76ec7508debf02a39d88f8b6c0c0 # v2.1.1
with:
dotnet-version: 7.0.x
source-url: https://nuget.pkg.github.com/equinor/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Build
run: dotnet build Src/Witsml/Witsml.csproj /warnaserror --configuration Release
- name: Test
run: dotnet test ./Tests/Witsml.Tests/Witsml.Tests.csproj --configuration Release
- name: Package
run: dotnet pack --configuration Release Src/Witsml -p:Version=2.8.${GITHUB_RUN_NUMBER}
- name: Publish
run: dotnet nuget push --api-key ${{secrets.NUGET_PUBLISH_KEY}} --source https://api.nuget.org/v3/index.json Src/Witsml/bin/Release/WitsmlClient.2.8.${GITHUB_RUN_NUMBER}.nupkg