Merge pull request #2171 from petrlicman/RemoveDuplicities#2044 #134
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: 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 |