Skip to content

Commit 042a31f

Browse files
committed
#2254 GitHub Actions: Cake release job
1 parent 5543f2e commit 042a31f

27 files changed

+529
-422
lines changed

.github/workflows/release.yml

+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: [ "release/24.0" ] # main
5+
env:
6+
WORKFLOW_VAR: Release # ${{ vars.WORKFLOW_VAR }}
7+
jobs:
8+
# build-linux:
9+
# runs-on: ubuntu-latest
10+
# strategy:
11+
# matrix:
12+
# dotnet-version: [ '8.0', '9.0' ]
13+
# steps:
14+
# - name: Setup .NET ${{ matrix.dotnet-version }}
15+
# uses: actions/setup-dotnet@v3
16+
# with:
17+
# dotnet-version: ${{ matrix.dotnet-version }}.x
18+
# - name: .NET Info
19+
# run: dotnet --info
20+
# - name: Checkout
21+
# uses: actions/checkout@v4
22+
# - name: Restore
23+
# run: dotnet restore ./Ocelot.Release.sln -p:TargetFramework=net${{ matrix.dotnet-version }}
24+
# - name: Build
25+
# run: dotnet build --no-restore ./Ocelot.Release.sln --framework net${{ matrix.dotnet-version }}
26+
# - name: Unit Tests
27+
# run: dotnet test --no-restore --no-build --verbosity minimal --framework net${{ matrix.dotnet-version }} ./test/Ocelot.UnitTests/Ocelot.UnitTests.csproj
28+
# - name: Integration Tests
29+
# run: dotnet test --no-restore --no-build --verbosity minimal --framework net${{ matrix.dotnet-version }} ./test/Ocelot.IntegrationTests/Ocelot.IntegrationTests.csproj
30+
# - name: Acceptance Tests
31+
# run: dotnet test --no-restore --no-build --verbosity minimal --framework net${{ matrix.dotnet-version }} ./test/Ocelot.AcceptanceTests/Ocelot.AcceptanceTests.csproj
32+
# build-windows:
33+
# needs: build-linux
34+
# runs-on: windows-latest
35+
# strategy:
36+
# matrix:
37+
# dotnet-version: [ '8.0', '9.0' ]
38+
# steps:
39+
# - name: Setup .NET ${{ matrix.dotnet-version }}
40+
# uses: actions/setup-dotnet@v3
41+
# with:
42+
# dotnet-version: ${{ matrix.dotnet-version }}.x
43+
# - name: .NET Info
44+
# run: dotnet --info
45+
# - name: Checkout
46+
# uses: actions/checkout@v4
47+
# - name: Restore
48+
# run: dotnet restore ./Ocelot.Release.sln -p:TargetFramework=net${{ matrix.dotnet-version }}
49+
# - name: Build
50+
# run: dotnet build --no-restore ./Ocelot.Release.sln --framework net${{ matrix.dotnet-version }}
51+
# - name: Unit Tests
52+
# run: dotnet test --no-restore --no-build --verbosity minimal --framework net${{ matrix.dotnet-version }} ./test/Ocelot.UnitTests/Ocelot.UnitTests.csproj
53+
# - name: Integration Tests
54+
# run: dotnet test --no-restore --no-build --verbosity minimal --framework net${{ matrix.dotnet-version }} ./test/Ocelot.IntegrationTests/Ocelot.IntegrationTests.csproj
55+
# - name: Acceptance Tests
56+
# run: dotnet test --no-restore --no-build --verbosity minimal --framework net${{ matrix.dotnet-version }} ./test/Ocelot.AcceptanceTests/Ocelot.AcceptanceTests.csproj
57+
# build-macos:
58+
# needs: build-windows
59+
# runs-on: macos-latest
60+
# strategy:
61+
# matrix:
62+
# dotnet-version: [ '8.0', '9.0' ]
63+
# steps:
64+
# - name: Setup .NET ${{ matrix.dotnet-version }}
65+
# uses: actions/setup-dotnet@v3
66+
# with:
67+
# dotnet-version: ${{ matrix.dotnet-version }}.x
68+
# - name: .NET Info
69+
# run: dotnet --info
70+
# - name: Checkout
71+
# uses: actions/checkout@v4
72+
# - name: Restore
73+
# run: dotnet restore ./Ocelot.Release.sln -p:TargetFramework=net${{ matrix.dotnet-version }}
74+
# - name: Build
75+
# run: dotnet build --no-restore ./Ocelot.Release.sln --framework net${{ matrix.dotnet-version }}
76+
# - name: Unit Tests
77+
# run: dotnet test --no-restore --no-build --verbosity minimal --framework net${{ matrix.dotnet-version }} ./test/Ocelot.UnitTests/Ocelot.UnitTests.csproj
78+
# - name: Integration Tests
79+
# run: dotnet test --no-restore --no-build --verbosity minimal --framework net${{ matrix.dotnet-version }} ./test/Ocelot.IntegrationTests/Ocelot.IntegrationTests.csproj
80+
# - name: Acceptance Tests
81+
# run: dotnet test --no-restore --no-build --verbosity minimal --framework net${{ matrix.dotnet-version }} ./test/Ocelot.AcceptanceTests/Ocelot.AcceptanceTests.csproj
82+
83+
# display-variables:
84+
# # name: ${{ vars.JOB_NAME }}
85+
# # You can use configuration variables with the `vars` context for dynamic jobs
86+
# if: true # ${{ vars.USE_VARIABLES == 'true' }}
87+
# runs-on: ubuntu-latest # ${{ vars.RUNNER }}
88+
# environment: build.cake
89+
# steps:
90+
# - name: Use variables
91+
# run: |
92+
# echo "CAKE_RELEASE_MYVAR variable : $CAKE_RELEASE_MYVAR"
93+
# echo "WORKFLOW_VAR : $WORKFLOW_VAR"
94+
# env:
95+
# ENV_CONTEXT_VAR: ${{ vars.ENV_CONTEXT_VAR }}
96+
# CAKE_RELEASE_MYVAR: ${{ vars.CAKE_RELEASE_MYVAR }}
97+
# - name: HELLO_WORLD
98+
# # if: ${{ vars.HELLO_WORLD_ENABLED == 'true' }}
99+
# uses: actions/hello-world-javascript-action@main
100+
# with:
101+
# who-to-greet: Raman # ${{ vars.GREET_NAME }}
102+
release-cake:
103+
# needs: build-macos
104+
runs-on: ubuntu-latest
105+
environment: build.cake
106+
env:
107+
# https://github.com/actions/setup-dotnet/blob/main/README.md#environment-variables
108+
DOTNET_INSTALL_DIR: "/usr/lib/dotnet" # override /usr/share/dotnet
109+
# NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
110+
steps:
111+
- name: Env Variables
112+
env:
113+
ENV_CONTEXT_VAR: ${{ vars.ENV_CONTEXT_VAR }}
114+
CAKE_RELEASE_MYVAR: ${{ vars.CAKE_RELEASE_MYVAR }}
115+
run: |
116+
echo "WORKFLOW_VAR : $WORKFLOW_VAR"
117+
echo "ENV_CONTEXT_VAR : $ENV_CONTEXT_VAR"
118+
echo "CAKE_RELEASE_MYVAR : $CAKE_RELEASE_MYVAR"
119+
- name: /usr/lib/dotnet
120+
run: |
121+
ls -ld /usr/lib/dotnet
122+
sudo chmod -R 775 /usr/lib/dotnet
123+
sudo chown -R $USER:$USER /usr/lib/dotnet
124+
ls -ld /usr/lib/dotnet
125+
- name: .NET Version
126+
run: dotnet --version
127+
- name: .NET Info
128+
run: dotnet --info
129+
- name: Check .NET 8
130+
id: check-dotnet8
131+
run: |
132+
DOTNET8_VERSION=$(dotnet --version)
133+
if [[ "$DOTNET8_VERSION" =~ ^8\.0\.[0-9]+$ ]]; then
134+
echo "dotnet8_installed=true" >> $GITHUB_ENV
135+
else
136+
echo "dotnet8_installed=false" >> $GITHUB_ENV
137+
fi
138+
- name: Setup .NET 8
139+
if: env.dotnet8_installed == 'false'
140+
uses: actions/setup-dotnet@v3
141+
with:
142+
dotnet-version: 8.0.x
143+
# - name: Setup .NET
144+
# uses: actions/setup-dotnet@v3
145+
# with:
146+
# dotnet-version: 8.0.x, 9.0.x
147+
- name: Check .NET 9
148+
id: check-dotnet9
149+
run: |
150+
DOTNET9_VERSION=$(dotnet --version)
151+
if [[ "$DOTNET9_VERSION" =~ ^9\.0\.[0-9]+$ ]]; then
152+
echo "dotnet9_installed=true" >> $GITHUB_ENV
153+
else
154+
echo "dotnet9_installed=false" >> $GITHUB_ENV
155+
fi
156+
- name: Setup .NET 9
157+
if: env.dotnet9_installed == 'false'
158+
uses: actions/setup-dotnet@v3
159+
with:
160+
dotnet-version: 9.0.x
161+
- name: .NET Info
162+
run: dotnet --info
163+
- name: Branch Name
164+
run: echo "Branch name is ${{ github.ref_name }}"
165+
- name: Checkout
166+
uses: actions/checkout@v4
167+
with:
168+
fetch-depth: 0
169+
- name: Cake Release
170+
uses: cake-build/cake-action@v3
171+
with:
172+
target: Release
173+
env:
174+
ENV_CONTEXT_VAR: ${{ vars.ENV_CONTEXT_VAR }}
175+
CAKE_RELEASE_MYVAR: ${{ vars.CAKE_RELEASE_MYVAR }}
176+
TEMP_KEY: ${{ secrets.TEMP_KEY }}
177+
OCELOT_GITHUB_API_KEY: ${{ secrets.OCELOT_GITHUB_API_KEY }}
178+
OCELOT_NUGET_API_KEY_2025: ${{ secrets.OCELOT_NUGET_API_KEY_2025 }}

ReleaseNotes.md

+1-15
Original file line numberDiff line numberDiff line change
@@ -1,15 +1 @@
1-
## :fire: Hot fixing #2246 issue (version {0}) aka v[{1}](https://github.com/ThreeMammals/Ocelot/releases/tag/{1}) patch :package:
2-
> Read the Docs: [Ocelot 23.4](https://ocelot.readthedocs.io/en/{0}/) with [PDF](https://ocelot.readthedocs.io/_/downloads/en/{0}/pdf/)
3-
> Hot fixed version: [{1}](https://github.com/ThreeMammals/Ocelot/releases/tag/{1})
4-
> Milestone: [November'24](https://github.com/ThreeMammals/Ocelot/milestone/10)
5-
6-
### :information_source: About
7-
:fire: Hot fixed issue: #2246
8-
:heart: A sincere and heartfelt "Thank You" to **Donny Tian**, @donnytian for reporting the bug.
9-
10-
### :warning: Warning
11-
1. Consider this patch as the last one supporting .NET 6 and 7 frameworks. For more details, refer to the [previous version notes](https://github.com/ThreeMammals/Ocelot/releases/tag/{1}).
12-
2. No further patches for this minor version are expected. The next major release will be [.NET 9](https://github.com/ThreeMammals/Ocelot/milestone/11), version **24.0**.
13-
14-
### :exclamation: Breaking Changes
15-
Upgrading from [23.4.0](https://github.com/ThreeMammals/Ocelot/releases/tag/23.4.0)-[{1}](https://github.com/ThreeMammals/Ocelot/releases/tag/{1}) to [{0}](https://github.com/Threeammals/Ocelot/releases/tag/{0}) introduces **no breaking changes**. However, some internal interfaces have been updated, which should not introduce IBC for 99.99% of projects. For further information, refer to the source code.
1+
## Technical Release

0 commit comments

Comments
 (0)