Skip to content

1

1 #13

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET PreRelease
on:
push:
branches: [ "feature/**" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Version Bump
uses: SiqiLu/dotnet-bump-version@2.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
version_mask: 0.0.0.1
version_files: "version.xml"
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore /p:VersionPrefix=$(cat version.xml) /p:VersionSuffix=rc
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish TempMail.Client NuGet Package
run: dotnet nuget push ./src/TempMail.Client/bin/Debug/TempMail.Client.*.nupkg -k ${{ secrets.NUGET_ORG_API_KEY }} -s https://api.nuget.org/v3/index.json
- name: Publish TempMail.Client.AspNetCore NuGet Package
run: dotnet nuget push ./src/TempMail.Client.AspNetCore/bin/Debug/TempMail.Client.AspNetCore.*.nupkg -k ${{ secrets.NUGET_ORG_API_KEY }} -s https://api.nuget.org/v3/index.json