feat (Builders): Renames set/remove attributes #13
Workflow file for this run
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 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: Publish to NuGet | |
# on Push tags matching v1.0.0 or v1.0.0-suffix | |
on: | |
push: | |
tags: | |
[ "v[0-9]+.[0-9]+.[0-9]+", "v[0-9]+.[0-9]+.[0-9]+-[0-9a-z]+" ] | |
jobs: | |
build: | |
env: | |
SOLUTION: 'src\Rhythm.Drop.sln' | |
BUILD_CONFIG: 'Release' | |
runs-on: ubuntu-latest | |
steps: | |
# Setup | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
# Remove 'v' prefix from tag to match NuGet version format | |
- name: Set Package Version | |
run: | | |
echo "PACKAGE_VERSION=${GITHUB_REF_NAME/v/}" >> "$GITHUB_ENV" | |
- name: Display Package Version | |
run: | | |
echo "Package Version: $PACKAGE_VERSION" | |
# Start packaging process | |
- name: Restore dependencies | |
run: dotnet restore $SOLUTION | |
- name: Pack Rhythm.Drop.Models | |
run: dotnet pack ./src/Rhythm.Drop.Models/Rhythm.Drop.Models.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Pack Rhythm.Drop.Infrastructure | |
run: dotnet pack ./src/Rhythm.Drop.Infrastructure/Rhythm.Drop.Infrastructure.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Pack Rhythm.Drop.Builders | |
if: ${{ ! startsWith(env.PACKAGE_VERSION, '1.') }} | |
run: dotnet pack ./src/Rhythm.Drop.Builders/Rhythm.Drop.Builders.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Pack Rhythm.Drop.Web.Infrastructure | |
run: dotnet pack ./src/Rhythm.Drop.Web.Infrastructure/Rhythm.Drop.Web.Infrastructure.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Pack Rhythm.Drop.Web | |
run: dotnet pack ./src/Rhythm.Drop.Web/Rhythm.Drop.Web.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Pack Rhythm.Drop | |
run: dotnet pack ./src/Rhythm.Drop/Rhythm.Drop.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Publish Packages to NuGet | |
run: dotnet nuget push **\*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json | |