Skip to content

Commit 6873c57

Browse files
committed
Add Release Package workflow
1 parent d02cf61 commit 6873c57

File tree

4 files changed

+64
-12
lines changed

4 files changed

+64
-12
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
name: Publish .NET Package
2-
1+
# Publishes beta-versions only
2+
name: Publish Package
33
on:
44
push:
55
branches:
66
- main
7-
tags:
8-
- 'v*' # Runs when a new version tag is pushed
97
jobs:
10-
build-pack-publish:
8+
build:
119
runs-on: ubuntu-latest
1210
permissions:
1311
packages: write
@@ -38,8 +36,8 @@ jobs:
3836
- name: Pack project
3937
run: dotnet pack ./src/Ocelot.Testing.csproj --configuration Release --output ./packages
4038

41-
- name: Publish to GitHub Packages
42-
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
4341

44-
- name: Publish to NuGet
45-
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: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Releases non-beta versions, without 'beta*' suffix
2+
name: Release Package
3+
on:
4+
push:
5+
branches:
6+
- main
7+
# Sequence of patterns matched against refs/tags
8+
tags:
9+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
# - name: Setup .NET
18+
# uses: actions/setup-dotnet@v4
19+
# with:
20+
# dotnet-version: |
21+
# 8.0.x
22+
# 9.0.x
23+
24+
- name: .NET Info
25+
run: dotnet --info
26+
27+
- name: Read XML with PowerShell
28+
id: getxml
29+
run: |
30+
[xml]$xml = Get-Content ./src/Ocelot.Testing.csproj
31+
$value_Version = $xml.SelectSingleNode("//Project/PropertyGroup/Version").InnerText
32+
echo "::set-output name=Version::$value_Version"
33+
34+
- name: Use extracted value
35+
run: |
36+
echo "Extracted value: ${{ steps.getxml.outputs.Version }}"
37+
38+
# - name: Create GitHub Release
39+
# uses: actions/create-release@v1
40+
# env:
41+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
42+
# with:
43+
# tag_name: ${{ github.ref }}
44+
# release_name: Release ${{ github.ref }}
45+
# # body_path: ReleaseNotes.md
46+
# body: |
47+
# ## Version [24.0.0](https://www.nuget.org/packages/Ocelot.Testing/24.0.0-beta2)
48+
# - Ocelot dependency package: v[24.0.0](https://www.nuget.org/packages/Ocelot/24.0.0)
49+
# - For Ocelot release: [24.0.0](https://github.com/ThreeMammals/Ocelot/releases/tag/24.0.0)
50+
# draft: false
51+
# prerelease: false

ReleaseNotes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Version [24.0.0](https://www.nuget.org/packages/Ocelot.Testing/24.0.0)
2+
- Ocelot dependency package: v[24.0.0](https://www.nuget.org/packages/Ocelot/24.0.0)
3+
- For Ocelot release: [24.0.0](https://github.com/ThreeMammals/Ocelot/releases/tag/24.0.0)

src/Ocelot.Testing.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Nullable>enable</Nullable>
77
<!--Package properties-->
88
<PackageId>Ocelot.Testing</PackageId>
9-
<Version>24.0.0-beta2</Version>
9+
<Version>24.0.0-beta3</Version>
1010
<Authors>Raman Maksimchuk</Authors>
1111
<Company>Three Mammals</Company>
1212
<Product>Ocelot Gateway</Product>
@@ -47,11 +47,11 @@
4747

4848
<!-- Conditionally obtain references for the net 8.0 target -->
4949
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
50-
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.15" />
50+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.16" />
5151
</ItemGroup>
5252
<!-- Conditionally obtain references for the net 9.0 target -->
5353
<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
54-
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="9.0.4" />
54+
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="9.0.5" />
5555
</ItemGroup>
5656

5757
</Project>

0 commit comments

Comments
 (0)