Skip to content

ci: update nuget action #7

ci: update nuget action

ci: update nuget action #7

Workflow file for this run

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
- run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- run: dotnet build --configuration Release /p:Version=${VERSION}
- run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
- run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
- run: dotnet nuget push Podimo.ConstEmbed.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_KEY}
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
- uses: softprops/action-gh-release@v1
with:
files: Podimo.ConstEmbed.${VERSION}.nupkg
generate_release_notes: true