Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 33 additions & 6 deletions .github/workflows/nuget-release-projectsruler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,36 @@ on:
- published

jobs:
release_ProjectsRuler:
name: Build and release ProjectsRuler package
uses: DigitecGalaxus/actions/.github/workflows/reusable-release-nuget.yml@v4
secrets: inherit
with:
proj-or-sln: dotnet/src/ProjectsRuler/ProjectsRuler.csproj
build-and-publish:
name: Build and Publish NuGet
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0
- name: Extract Version from Tag
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Install Dependencies
run: dotnet restore
- name: Build Solution
run: |
dotnet build --configuration Release \
--no-restore \
-p:CI_BUILD=true \
-p:Version=${{env.VERSION}} \
-p:PackageVersion=${{env.VERSION}} \
- name: Pack NuGet Packages
run: |
dotnet pack --configuration Release \
--no-build \
-p:CI_BUILD=true \
-p:Version=${{env.VERSION}} \
-p:PackageVersion=${{env.VERSION}} \
--output ./artifacts
- name: Publish to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY
Loading