Merge pull request #1 from TheEightBot/feature/drawer-buildout #3
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: .NET | ||
on: | ||
push: | ||
tags: | ||
- "v**" | ||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: "8.x" | ||
source-url: https://nuget.pkg.github.com/theeightbot/index.json | ||
env: | ||
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
- name: Install MAUI Workloads | ||
run: dotnet workload install maui --ignore-failed-sources | ||
- name: Semver Parse | ||
id: version | ||
uses: release-kit/[email protected] | ||
- name: Build | ||
run: dotnet build MauiDrawer/MauiDrawer.csproj | ||
- name: Create the package | ||
run: dotnet pack --configuration Release /p:AssemblyVersion=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} /p:Version=${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} MauiDrawer/MauiDrawer.csproj | ||
- name: Publish the package to GPR | ||
run: dotnet nuget push MauiDrawer/bin/Release/*.nupkg | ||
- name: Publish the package to NuGet | ||
run: dotnet nuget push MauiDrawer/bin/Release/*.nupkg --api-key "${{ secrets.EIGHTBOT_NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json |