Workflow file for this run
This file contains hidden or 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 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 | sed -n '/Version/{s/<Version[^<]*>\([^<]*\)<.*/\1/;p;q}') /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 | |
- name: GitHub Tag | |
uses: IIlyichev/github-tag-action@v6.3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
custom_tag: "v$(cat version.xml | sed -n '/Version/{s/<Version[^<]*>\\([^<]*\\)<.*/\\1/;p;q}')-rc" |