Skip to content

added version prefix to RoveComm.csproj #14

added version prefix to RoveComm.csproj

added version prefix to RoveComm.csproj #14

Workflow file for this run

name: Publish NuGet Package
on:
push:
branches:
- development
workflow_dispatch:
jobs:
publish:
name: Publish NuGet Package
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0'
- name: Restore dependencies
run: dotnet restore ./RoveComm/RoveComm.csproj
- name: Build project
run: dotnet build ./RoveComm/RoveComm.csproj --configuration Release
- name: Pack NuGet Package
run: dotnet pack ./RoveComm/RoveComm.csproj --configuration Release --output ./output
- name: Publish to GitHub Packages
id: publish_github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
dotnet nuget push "./output/RoveComm.*.nupkg" \
--source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
--symbol-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
--api-key $GITHUB_TOKEN \
--skip-duplicate
- name: Publish to NuGet.org
id: publish_nuget
if: steps.publish_github.conclusion != 'cancelled'
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
dotnet nuget push "./output/RoveComm.*.nupkg" \
--source "https://api.nuget.org/v3/index.json" \
--symbol-source "https://nuget.smbsrc.net/" \
--api-key $NUGET_API_KEY \
--skip-duplicate