Merge pull request #74 from DenisPav/feat/async #119
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
name: Bump package version | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: | | |
6.0.x | |
7.0.x | |
8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Run tests | |
run: dotnet test | |
- name: Bump version | |
id: bump | |
shell: pwsh | |
run: | | |
$xml = [Xml] (Get-Content .\src\Ooze.Typed\Ooze.Typed.csproj) | |
$version = [Version] $xml.Project.PropertyGroup.Version | |
$newVersion = "{0}.{1}.{2}" -f $version.Major, $version.Minor, ($version.Build + 1) | |
$xml.Project.PropertyGroup.Version = $newVersion | |
$xml.Save("./src/Ooze.Typed/Ooze.Typed.csproj") | |
$xml = [Xml] (Get-Content .\src\Ooze.Typed.EntityFrameworkCore\Ooze.Typed.EntityFrameworkCore.csproj) | |
$xml.Project.PropertyGroup.Version = $newVersion | |
$xml.Save("./src/Ooze.Typed.EntityFrameworkCore/Ooze.Typed.EntityFrameworkCore.csproj") | |
$xml = [Xml] (Get-Content .\src\Ooze.Typed.EntityFrameworkCore.Sqlite\Ooze.Typed.EntityFrameworkCore.Sqlite.csproj) | |
$xml.Project.PropertyGroup.Version = $newVersion | |
$xml.Save("./src/Ooze.Typed.EntityFrameworkCore.Sqlite/Ooze.Typed.EntityFrameworkCore.Sqlite.csproj") | |
$xml = [Xml] (Get-Content .\src\Ooze.Typed.EntityFrameworkCore.SqlServer\Ooze.Typed.EntityFrameworkCore.SqlServer.csproj) | |
$xml.Project.PropertyGroup.Version = $newVersion | |
$xml.Save("./src/Ooze.Typed.EntityFrameworkCore.SqlServer/Ooze.Typed.EntityFrameworkCore.SqlServer.csproj") | |
$xml = [Xml] (Get-Content .\src\Ooze.Typed.EntityFrameworkCore.Npgsql\Ooze.Typed.EntityFrameworkCore.Npgsql.csproj) | |
$xml.Project.PropertyGroup.Version = $newVersion | |
$xml.Save("./src/Ooze.Typed.EntityFrameworkCore.Npgsql/Ooze.Typed.EntityFrameworkCore.Npgsql.csproj") | |
$xml = [Xml] (Get-Content .\src\Ooze.Typed.EntityFrameworkCore.MySql\Ooze.Typed.EntityFrameworkCore.MySql.csproj) | |
$xml.Project.PropertyGroup.Version = $newVersion | |
$xml.Save("./src/Ooze.Typed.EntityFrameworkCore.MySql/Ooze.Typed.EntityFrameworkCore.MySql.csproj") | |
echo "::set-output name=newVersion::$newVersion" | |
- name: Commit changes | |
run: | | |
git status | |
git config user.name "ooze" | |
git config user.email "[email protected]" | |
git add ./src/* | |
git commit -m "Bump project version to ${{ steps.bump.outputs.newVersion }}" | |
git push |