feat (Project): adds buildtransitive props for implicitly using Rhyth… #3
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.Umbraco.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.Umbraco.Builders | |
run: dotnet pack ./src/Rhythm.Drop.Umbraco.Builders/Rhythm.Drop.Umbraco.Builders.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Pack Rhythm.Drop.Umbraco.Web | |
run: dotnet pack ./src/Rhythm.Drop.Umbraco.Web/Rhythm.Drop.Umbraco.Web.csproj --no-restore -c $BUILD_CONFIG /p:version=$PACKAGE_VERSION | |
- name: Pack Rhythm.Drop.Umbraco | |
run: dotnet pack ./src/Rhythm.Drop.Umbraco/Rhythm.Drop.Umbraco.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 | |