-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: update to .net 9 and add release github action
deps: bump github actions versions fix: github actions fix: try again fix again fix: make script executable fix: github actions fix: github actions fix: add runs on to github action fix: push requirement
- Loading branch information
1 parent
65c3ed7
commit 6b00be7
Showing
7 changed files
with
87 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Release | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
version: | ||
name: Create New version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🔻 Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup dotnet | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 9.0.x | ||
|
||
- name: 🏷️ Semantic Release | ||
id: release | ||
uses: cycjimmy/semantic-release-action@v4 | ||
with: | ||
extra_plugins: | | ||
@semantic-release/commit-analyzer | ||
@semantic-release/release-notes-generator | ||
@semantic-release/github | ||
@semantic-release/git | ||
@semantic-release/exec | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
deploy: | ||
name: Deploy version | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
project-name: [ Rapidata.MongoDB.Migrations, Rapidata.MongoDB.Migrations.AspNetCore ] | ||
needs: [ version ] | ||
steps: | ||
- name: Pack & Publish to NuGet | ||
run: | | ||
dotnet pack src/${{ matrix.project-name }}/${{ matrix.project-path }}.csproj --configuration Release --include-symbols --output ${{ github.workspace }}/output/${{ matrix.project-name }} | ||
dotnet nuget push ${{ github.workspace }}/output/${{ matrix.project-name }}/*.nupkg -k ${{ secrets.NUGET_TOKEN }} -s ${{ secrets.NUGET_PUSH_URL }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"branches": [ | ||
"v+([0-9])?(.{+([0-9]),x}).x", | ||
"main", | ||
{ | ||
"name": "beta", | ||
"prerelease": true | ||
}, | ||
{ | ||
"name": "alpha", | ||
"prerelease": true | ||
} | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"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'" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"$CURRENT_PROJECT" | ||
], | ||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
] | ||
] | ||
} |
2 changes: 1 addition & 1 deletion
2
src/Rapidata.MongoDB.Migrations.AspNetCore/Rapidata.MongoDB.Migrations.AspNetCore.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Rapidata.MongoDB.Migrations/Rapidata.MongoDB.Migrations.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...MongoDB.Migrations.Tests.Integration/Rapidata.MongoDB.Migrations.Tests.Integration.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
tests/Rapidata.MongoDB.Migrations.Tests.Unit/Rapidata.MongoDB.Migrations.Tests.Unit.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
echo "new_release_version=$1" >> "$GITHUB_OUTPUT" | ||
sed -i '' "s#<Version>.*#<Version>$1</Version>#" "$2" |