Skip to content

Commit a98b54a

Browse files
authored
Create nuget-push-to-esdm-nexus.yml
1 parent e4e9519 commit a98b54a

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Manual NuGet Push to ESDM Nexus
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
push-nuget:
8+
runs-on: ubuntu-latest
9+
steps: # <-- Correct indentation
10+
- uses: actions/checkout@v4
11+
- name: Setup .NET
12+
uses: actions/setup-dotnet@v4
13+
with:
14+
dotnet-version: 8.0.x
15+
- name: Setup NuGet
16+
run: dotnet nuget add source ${{ secrets.ESDM_NUGET_HOSTED_URL }} -u ${{ secrets.NUGET_USERNAME }} -p ${{ secrets.NUGET_PASSWORD }} --store-password-in-clear-text
17+
- name: Restore dependencies
18+
run: dotnet restore
19+
- name: Build
20+
run: dotnet build -c Release
21+
- name: Create NuGet package
22+
run: dotnet pack -c Release
23+
- name: Publish NuGet package
24+
run: dotnet nuget push **/*.nupkg --source ${{ secrets.ESDM_NUGET_HOSTED_URL }}
25+
- name: Find and Push NuGet packages
26+
run: |
27+
PACKAGES=$(find . -name "*.nupkg" | grep -E "cloudscribe|sts\.Common")
28+
if [ -z "$PACKAGES" ]; then
29+
echo "No matching package found. Exiting."
30+
exit 1
31+
fi
32+
echo "Found packages: $PACKAGES"
33+
for PACKAGE in $PACKAGES; do
34+
echo "Pushing $PACKAGE"
35+
done

0 commit comments

Comments
 (0)