Skip to content

Commit a5720a7

Browse files
committed
Merge branch 'master' into develop
2 parents 0d833c8 + cb9eed6 commit a5720a7

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: NuGet Push to Production - ESDM Nexus and nuget.org
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
push-nuget:
8+
runs-on: ubuntu-latest
9+
steps:
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: Exit if the branch is not master
16+
run: |
17+
if [[ "${{ github.ref }}" != "refs/heads/master" ]]; then
18+
echo "Branch is not master, exiting."
19+
exit 1
20+
fi
21+
- name: Setup NuGet
22+
run: dotnet nuget add source ${{ secrets.NUGET_SOURCE_URL }} -u ${{ secrets.NUGET_USERNAME }} -p ${{ secrets.NUGET_PASSWORD }} --store-password-in-clear-text --name esdm-nuget-testing
23+
- name: Restore dependencies
24+
run: dotnet restore
25+
- name: Build
26+
run: dotnet build -c Release
27+
- name: Create NuGet package
28+
run: dotnet pack -c Release
29+
- name: Auth to other Nexus repo
30+
run: dotnet nuget add source ${{ secrets.ESDM_NUGET_HOSTED_URL }} -u ${{ secrets.NUGET_USERNAME }} -p ${{ secrets.NUGET_PASSWORD }} --store-password-in-clear-text --name esdm-nuget-hosted
31+
- name: Find and Push NuGet packages to Nexus
32+
run: |
33+
PACKAGES=$(find . -name "*.nupkg" | grep -E "cloudscribe|sts\.Common")
34+
if [ -z "$PACKAGES" ]; then
35+
echo "No matching package found. Exiting."
36+
exit 1
37+
fi
38+
echo "Found packages: $PACKAGES"
39+
for PACKAGE in $PACKAGES; do
40+
echo "Pushing $PACKAGE to Nexus"
41+
dotnet nuget push "$PACKAGE" --source esdm-nuget-hosted --skip-duplicate || echo "WARNING - skipping duplicate package: $PACKAGE"
42+
done
43+
- name: Find and Push NuGet packages to nuget.org
44+
run: |
45+
PACKAGES=$(find . -name "*.nupkg" | grep -E "cloudscribe|sts\.Common")
46+
if [ -z "$PACKAGES" ]; then
47+
echo "No matching package found. Exiting."
48+
exit 1
49+
fi
50+
echo "Found packages: $PACKAGES"
51+
for PACKAGE in $PACKAGES; do
52+
echo "Pushing $PACKAGE to nuget.org"
53+
dotnet nuget push "$PACKAGE" --api-key "$NUGET_ORG_API_KEY" --source "https://api.nuget.org/v3/index.json" --skip-duplicate || echo "WARNING - failed to upload package: $PACKAGE"
54+
done

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ a re-useable RSS Feed generator for ASP.NET Core
44
It was implemented for use in [cloudscribe SimpleContent](https://github.com/joeaudette/cloudscribe.SimpleContent), but could be used by anyone who would like to add [RSS Feed](http://cyber.law.harvard.edu/rss/rss.html) support to their web application.
55

66
### Build Status
7-
7+
<!--
88
| Windows | Linux/Mac |
99
| ------------- | ------------- |
1010
| [![Build status](https://ci.appveyor.com/api/projects/status/si9j58aa51wel2dv/branch/master?svg=true)](https://ci.appveyor.com/project/joeaudette/cloudscribe-syndication/branch/master) | [![Build Status](https://travis-ci.org/cloudscribe/cloudscribe.Syndication.svg?branch=master)](https://travis-ci.org/cloudscribe/cloudscribe.Syndication) |
11+
-->
12+
13+
<!-- Making badges prettier: -->
14+
[![CS Build Devel](https://img.shields.io/github/actions/workflow/status/cloudscribe/cloudscribe.Syndication/cloudscribe-develop.yml?branch=develop&event=push&style=for-the-badge&label=🚀%20Develop%20Branch)](https://github.com/cloudscribe/cloudscribe.Syndication/actions/workflows/cloudscribe-develop.yml)
1115

1216
If you have questions please visit our community forum https://www.cloudscribe.com/forum
1317

0 commit comments

Comments
 (0)