Skip to content

Commit 721eccf

Browse files
committed
Final version of Release Package workflow
1 parent 0848f14 commit 721eccf

File tree

2 files changed

+24
-25
lines changed

2 files changed

+24
-25
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ jobs:
2727
- name: .NET Info
2828
run: dotnet --info
2929

30-
# - name: Restore dependencies
31-
# run: dotnet restore ./Ocelot.Testing.sln
30+
- name: Restore dependencies
31+
run: dotnet restore ./Ocelot.Testing.sln
3232

33-
# - name: Build project
34-
# run: dotnet build ./src/Ocelot.Testing.csproj --configuration Release --no-restore
33+
- name: Build project
34+
run: dotnet build ./src/Ocelot.Testing.csproj --configuration Release --no-restore
3535

36-
# - name: Pack project
37-
# run: dotnet pack ./src/Ocelot.Testing.csproj --configuration Release --output ./packages
36+
- name: Pack project
37+
run: dotnet pack ./src/Ocelot.Testing.csproj --configuration Release --output ./packages
3838

39-
# - name: Publish to GitHub Packages
40-
# run: dotnet nuget push ./packages/*.nupkg --source "https://nuget.pkg.github.com/ThreeMammals/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
39+
- name: Publish to GitHub Packages
40+
run: dotnet nuget push ./packages/*.nupkg --source "https://nuget.pkg.github.com/ThreeMammals/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
4141

42-
# - name: Publish to NuGet
43-
# run: dotnet nuget push ./packages/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_API_KEY_2025 }} --skip-duplicate
42+
- name: Publish to NuGet
43+
run: dotnet nuget push ./packages/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_API_KEY_2025 }} --skip-duplicate

.github/workflows/release.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
name: Release Package
33
on:
44
push:
5-
branches:
6-
- main
75
tags:
86
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
97
jobs:
@@ -64,26 +62,27 @@ jobs:
6462
run: dotnet build ./src/Ocelot.Testing.csproj --configuration Release --no-restore
6563
- name: Pack project
6664
run: dotnet pack ./src/Ocelot.Testing.csproj --configuration Release --output ./packages
67-
# - name: Publish to GitHub Packages
68-
# run: dotnet nuget push ./packages/*.nupkg --source "https://nuget.pkg.github.com/ThreeMammals/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
69-
# - name: Publish to NuGet
70-
# run: dotnet nuget push ./packages/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_API_KEY_2025 }} --skip-duplicate
71-
- name: Find assets
72-
id: assets
73-
run: |
74-
echo "ASSETS=$(find packages/*.* -print | tr '\n' ' ')" >> $GITHUB_OUTPUT
75-
echo "ASSETS=$(find packages/ -name '*.*pkg' -printf '%f\n')"
76-
- name: Use files in another step
77-
run: |
78-
echo "Files found: ${{ steps.assets.outputs.ASSETS }}"
65+
- name: Publish to GitHub Packages
66+
run: dotnet nuget push ./packages/*.nupkg --source "https://nuget.pkg.github.com/ThreeMammals/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
67+
- name: Publish to NuGet
68+
run: dotnet nuget push ./packages/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_API_KEY_2025 }} --skip-duplicate
69+
70+
# - name: Find assets
71+
# id: assets
72+
# run: |
73+
# echo "ASSETS=$(find packages/*.* -print | tr '\n' ' ')" >> $GITHUB_OUTPUT
74+
# echo "ASSETS=$(find packages/ -name '*.*pkg' -printf '%f\n')"
75+
# - name: Use files in another step
76+
# run: |
77+
# echo "Files found: ${{ steps.assets.outputs.ASSETS }}"
7978

8079
- name: GitHub Release
8180
uses: softprops/action-gh-release@v2
8281
env:
8382
PACKAGE_VERSION: ${{ steps.ver.outputs.PkgVersion }}
8483
OCELOT_VERSION: ${{ steps.xml.outputs.OcelotRefVer }}
8584
with:
86-
tag_name: 0.0.5 # Name of a tag. defaults to github.ref_name
85+
# tag_name: 0.0.5 # Name of a tag. defaults to github.ref_name
8786
body: |
8887
## Version [${{ env.PACKAGE_VERSION }}](https://www.nuget.org/packages/Ocelot.Testing/${{ env.PACKAGE_VERSION }})
8988
- Ocelot dependency package: v[${{ env.OCELOT_VERSION }}](https://www.nuget.org/packages/Ocelot/${{ env.OCELOT_VERSION }})

0 commit comments

Comments
 (0)