Skip to content

Commit 93b5a47

Browse files
author
Christoph Bühler
committed
fix: change prerelease / release logic
1 parent 8f37128 commit 93b5a47

File tree

3 files changed

+56
-25
lines changed

3 files changed

+56
-25
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: .NET Pre Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
semantic-release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 1
15+
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v3
18+
with:
19+
dotnet-version: 8.x
20+
21+
- name: Semantic Release
22+
uses: cycjimmy/semantic-release-action@v3
23+
with:
24+
semantic_version: 21
25+
extra_plugins: |
26+
semantic-release-net
27+
branches: |
28+
[
29+
{
30+
"name": "main",
31+
"prerelease": true
32+
}
33+
]
34+
env:
35+
DEBUG: semantic-release:*
36+
NUGET_API_KEY: ${{ secrets.NUGET_KEY }}
37+
GH_NUGET_API_KEY: ${{ secrets.GITHUB_TOKEN }}
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/dotnet-release.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
name: .NET Release
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
- release
8-
- "maintenance/**"
4+
workflow_dispatch:
95

106
jobs:
117
semantic-release:
@@ -23,9 +19,25 @@ jobs:
2319
- name: Semantic Release
2420
uses: cycjimmy/semantic-release-action@v3
2521
with:
26-
semantic_version: 19
22+
semantic_version: 21
2723
extra_plugins: |
2824
semantic-release-net
25+
branches: |
26+
[
27+
"main",
28+
{
29+
"name": "maintenance/7.x",
30+
"range": "7.x"
31+
},
32+
{
33+
"name": "maintenance/8.x",
34+
"range": "8.x"
35+
},
36+
{
37+
"name": "maintenance/9.x",
38+
"range": "9.x"
39+
}
40+
]
2941
env:
3042
DEBUG: semantic-release:*
3143
NUGET_API_KEY: ${{ secrets.NUGET_KEY }}

.releaserc.json

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
{
22
"debug": true,
3-
"branches": [
4-
{
5-
"name": "maintenance/7.x",
6-
"range": "7.x"
7-
},
8-
{
9-
"name": "maintenance/8.x",
10-
"range": "8.x"
11-
},
12-
{
13-
"name": "maintenance/9.x",
14-
"range": "9.x"
15-
},
16-
{
17-
"name": "main",
18-
"prerelease": "pre"
19-
},
20-
"release"
21-
],
223
"plugins": [
234
"@semantic-release/commit-analyzer",
245
"@semantic-release/release-notes-generator",

0 commit comments

Comments
 (0)