Skip to content

Commit 373cc6e

Browse files
fix: github actions
1 parent bf641e9 commit 373cc6e

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,17 @@ on:
77

88
jobs:
99
version:
10-
strategy:
11-
matrix:
12-
project-name: [Rapidata.MongoDB.Migrations, Rapidata.MongoDB.Migrations.AspNetCore]
1310
name: Create New version
1411
runs-on: ubuntu-latest
1512
steps:
1613
- name: 🔻 Checkout
1714
uses: actions/checkout@v4
18-
15+
1916
- name: Setup dotnet
2017
uses: actions/setup-dotnet@v4
2118
with:
2219
dotnet-version: 9.0.x
23-
20+
2421
- name: 🏷️ Semantic Release
2522
id: release
2623
uses: cycjimmy/semantic-release-action@v4
@@ -33,8 +30,14 @@ jobs:
3330
@semantic-release/exec
3431
env:
3532
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36-
CURRENT_PROJECT: ${{ matrix.project-name }}
37-
33+
34+
deploy:
35+
strategy:
36+
matrix:
37+
project-name: [ Rapidata.MongoDB.Migrations, Rapidata.MongoDB.Migrations.AspNetCore ]
38+
requires:
39+
- version
40+
steps:
3841
- name: Pack & Publish to NuGet
3942
if: ${{ steps.release.outputs.new_release_version }}
4043
run: |

.releaserc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
[
1919
"@semantic-release/exec",
2020
{
21-
"prepareCmd": "./updateVersion.sh '${nextRelease.version}'"
21+
"prepareCmd": "./updateVersion.sh '${nextRelease.version}' 'src/Rapidata.MongoDB.Migrations/Rapidata.MongoDB.Migrations.csproj' && ./updateVersion.sh '${nextRelease.version}' 'src/Rapidata.MongoDB.Migrations.AspNetCore/Rapidata.MongoDB.Migrations.AspNetCore.csproj'"
2222
}
2323
],
2424
[

updateVersion.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
echo "new_release_version=$1" >> "$GITHUB_OUTPUT"
4-
sed -i "s#<Version>.*#<Version>$1</Version>#" "src/$CURRENT_PROJECT/$CURRENT_PROJECT.csproj"
4+
sed -i "s#<Version>.*#<Version>$1</Version>#" "$2"

0 commit comments

Comments
 (0)