From 93b5a479e34fa859d640009638d34e0a87dbcf06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BChler?= Date: Mon, 13 May 2024 21:43:40 +0200 Subject: [PATCH 1/4] fix: change prerelease / release logic --- .github/workflows/dotnet-pre-release.yml | 38 ++++++++++++++++++++++++ .github/workflows/dotnet-release.yml | 24 +++++++++++---- .releaserc.json | 19 ------------ 3 files changed, 56 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/dotnet-pre-release.yml diff --git a/.github/workflows/dotnet-pre-release.yml b/.github/workflows/dotnet-pre-release.yml new file mode 100644 index 00000000..88898c97 --- /dev/null +++ b/.github/workflows/dotnet-pre-release.yml @@ -0,0 +1,38 @@ +name: .NET Pre Release + +on: + push: + branches: + - main + +jobs: + semantic-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 1 + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.x + + - name: Semantic Release + uses: cycjimmy/semantic-release-action@v3 + with: + semantic_version: 21 + extra_plugins: | + semantic-release-net + branches: | + [ + { + "name": "main", + "prerelease": true + } + ] + env: + DEBUG: semantic-release:* + NUGET_API_KEY: ${{ secrets.NUGET_KEY }} + GH_NUGET_API_KEY: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml index 31ad60a7..97377754 100644 --- a/.github/workflows/dotnet-release.yml +++ b/.github/workflows/dotnet-release.yml @@ -1,11 +1,7 @@ name: .NET Release on: - push: - branches: - - main - - release - - "maintenance/**" + workflow_dispatch: jobs: semantic-release: @@ -23,9 +19,25 @@ jobs: - name: Semantic Release uses: cycjimmy/semantic-release-action@v3 with: - semantic_version: 19 + semantic_version: 21 extra_plugins: | semantic-release-net + branches: | + [ + "main", + { + "name": "maintenance/7.x", + "range": "7.x" + }, + { + "name": "maintenance/8.x", + "range": "8.x" + }, + { + "name": "maintenance/9.x", + "range": "9.x" + } + ] env: DEBUG: semantic-release:* NUGET_API_KEY: ${{ secrets.NUGET_KEY }} diff --git a/.releaserc.json b/.releaserc.json index 2b7563d3..86c537c8 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -1,24 +1,5 @@ { "debug": true, - "branches": [ - { - "name": "maintenance/7.x", - "range": "7.x" - }, - { - "name": "maintenance/8.x", - "range": "8.x" - }, - { - "name": "maintenance/9.x", - "range": "9.x" - }, - { - "name": "main", - "prerelease": "pre" - }, - "release" - ], "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", From 4af8dee6682be7dcc8eb93597561f460aca6595d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BChler?= Date: Mon, 13 May 2024 21:46:55 +0200 Subject: [PATCH 2/4] chore: use sem-rel-action v4 --- .github/workflows/dotnet-pre-release.yml | 2 +- .github/workflows/dotnet-release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet-pre-release.yml b/.github/workflows/dotnet-pre-release.yml index 88898c97..17c0f0f1 100644 --- a/.github/workflows/dotnet-pre-release.yml +++ b/.github/workflows/dotnet-pre-release.yml @@ -19,7 +19,7 @@ jobs: dotnet-version: 8.x - name: Semantic Release - uses: cycjimmy/semantic-release-action@v3 + uses: cycjimmy/semantic-release-action@v4 with: semantic_version: 21 extra_plugins: | diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml index 97377754..7e2184ce 100644 --- a/.github/workflows/dotnet-release.yml +++ b/.github/workflows/dotnet-release.yml @@ -17,7 +17,7 @@ jobs: dotnet-version: 8.x - name: Semantic Release - uses: cycjimmy/semantic-release-action@v3 + uses: cycjimmy/semantic-release-action@v4 with: semantic_version: 21 extra_plugins: | From 91692c036f293b1342da395d46cd91abd33d33db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BChler?= Date: Mon, 13 May 2024 21:50:08 +0200 Subject: [PATCH 3/4] chore: fix branches config --- .github/workflows/dotnet-pre-release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-pre-release.yml b/.github/workflows/dotnet-pre-release.yml index 17c0f0f1..7925e4d5 100644 --- a/.github/workflows/dotnet-pre-release.yml +++ b/.github/workflows/dotnet-pre-release.yml @@ -29,7 +29,8 @@ jobs: { "name": "main", "prerelease": true - } + }, + "release" ] env: DEBUG: semantic-release:* From 05a97d33becfffb17b469cfc6e809ad0dc84b2bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BChler?= Date: Mon, 13 May 2024 21:53:18 +0200 Subject: [PATCH 4/4] fix(release): only use correct releases and no prereleases --- .github/workflows/dotnet-pre-release.yml | 39 ------------------------ .github/workflows/dotnet-release.yml | 4 ++- 2 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/dotnet-pre-release.yml diff --git a/.github/workflows/dotnet-pre-release.yml b/.github/workflows/dotnet-pre-release.yml deleted file mode 100644 index 7925e4d5..00000000 --- a/.github/workflows/dotnet-pre-release.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: .NET Pre Release - -on: - push: - branches: - - main - -jobs: - semantic-release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 1 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 8.x - - - name: Semantic Release - uses: cycjimmy/semantic-release-action@v4 - with: - semantic_version: 21 - extra_plugins: | - semantic-release-net - branches: | - [ - { - "name": "main", - "prerelease": true - }, - "release" - ] - env: - DEBUG: semantic-release:* - NUGET_API_KEY: ${{ secrets.NUGET_KEY }} - GH_NUGET_API_KEY: ${{ secrets.GITHUB_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml index 7e2184ce..fc910f10 100644 --- a/.github/workflows/dotnet-release.yml +++ b/.github/workflows/dotnet-release.yml @@ -1,7 +1,9 @@ name: .NET Release on: - workflow_dispatch: + push: + branches: + - main jobs: semantic-release: