Skip to content

Commit 7871e46

Browse files
committed
Release Package, final version
1 parent 7e0eaef commit 7871e46

File tree

2 files changed

+32
-21
lines changed

2 files changed

+32
-21
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ 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

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

.github/workflows/release.yml

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@ on:
44
push:
55
branches:
66
- main
7-
# Sequence of patterns matched against refs/tags
87
tags:
98
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
109
jobs:
1110
release:
1211
runs-on: ubuntu-latest
12+
permissions:
13+
packages: write
14+
contents: read
1315
steps:
1416
- name: Checkout repository
1517
uses: actions/checkout@v4
1618

17-
# - name: Setup .NET
18-
# uses: actions/setup-dotnet@v4
19-
# with:
20-
# dotnet-version: |
21-
# 8.0.x
22-
# 9.0.x
23-
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v4
21+
with:
22+
dotnet-version: |
23+
8.0.x
24+
9.0.x
2425
- name: .NET Info
2526
run: dotnet --info
2627

2728
- name: Install XML tools
2829
run: |
2930
sudo apt update
30-
sudo apt install libxml2-utils
31-
sudo apt install xmlstarlet
31+
sudo apt install libxml2-utils xmlstarlet
3232
- name: Read XML
3333
id: xml
3434
run: |
@@ -57,27 +57,38 @@ jobs:
5757
xml_value=$(xmllint --xpath "string(//Project/PropertyGroup/Version)" ./src/Ocelot.Testing.csproj)
5858
echo "Replaced Version: $xml_value"
5959
echo "PkgVersion=$xml_value" >> $GITHUB_OUTPUT
60+
61+
- name: Restore dependencies
62+
run: dotnet restore ./Ocelot.Testing.sln
63+
- name: Build project
64+
run: dotnet build ./src/Ocelot.Testing.csproj --configuration Release --no-restore
65+
- name: Pack project
66+
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
6071
- name: Find assets
6172
id: assets
6273
run: |
63-
echo "ASSETS=$(find . -name '*.md' -print | tr '\n' ' ')" >> $GITHUB_OUTPUT
64-
echo "ASSETS=$(find . -name '*.md' -printf '%f\n')"
74+
echo "ASSETS=$(find packages/*.* -print | tr '\n' ' ')" >> $GITHUB_OUTPUT
75+
echo "ASSETS=$(find packages/ -name '*.*pkg' -printf '%f\n')"
6576
- name: Use files in another step
6677
run: |
6778
echo "Files found: ${{ steps.assets.outputs.ASSETS }}"
79+
6880
- name: GitHub Release
6981
uses: softprops/action-gh-release@v2
7082
env:
7183
PACKAGE_VERSION: ${{ steps.ver.outputs.PkgVersion }}
7284
OCELOT_VERSION: ${{ steps.xml.outputs.OcelotRefVer }}
7385
with:
74-
tag_name: 0.0.4 # Name of a tag. defaults to github.ref_name
86+
tag_name: 0.0.5 # Name of a tag. defaults to github.ref_name
7587
body: |
7688
## Version [${{ env.PACKAGE_VERSION }}](https://www.nuget.org/packages/Ocelot.Testing/${{ env.PACKAGE_VERSION }})
7789
- Ocelot dependency package: v[${{ env.OCELOT_VERSION }}](https://www.nuget.org/packages/Ocelot/${{ env.OCELOT_VERSION }})
7890
- For Ocelot release: [${{ env.OCELOT_VERSION }}](https://github.com/ThreeMammals/Ocelot/releases/tag/${{ env.OCELOT_VERSION }})
79-
#files: ${{ steps.assets.outputs.ASSETS }}
8091
files: |
81-
*.md
92+
packages/*.*pkg
8293
draft: false
8394
prerelease: false

0 commit comments

Comments
 (0)