Skip to content

Updating github workflows #12

Updating github workflows

Updating github workflows #12

Workflow file for this run

name: Publish to Nuget
on:
push:
branches:
- main
jobs:
publish:
name: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "0"
- id: tag
uses: Viostream/github-tag-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Write out version
run: |
version=${{ steps.tag.outputs.new_tag }}
- name: Build
run: dotnet build -c Release src/NHibernate.Json/NHibernate.Json.csproj
- name: Package
run: |
version=${{ steps.tag.outputs.new_tag }}
dotnet pack -c Release src/NHibernate.Json/NHibernate.Json.csproj -o . -p:PackageVersion=${version#v}
- name: Nuget push
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate