Merge pull request #5 from TheEightBot/feature/update-build #26
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: .NET | |
on: | |
push: | |
tags: | |
- "v**" | |
env: | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
DOTNET_NOLOGO: true | |
NuGetDirectory: ${{ github.workspace}}/nuget | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "7.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 Aurora Controls MAUI | |
run: dotnet build AuroraControlsMaui/AuroraControls.Maui.csproj | |
- name: Create the package | |
run: dotnet pack --configuration Release --output ${{ env.NuGetDirectory }} /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 }} AuroraControlsMaui/AuroraControls.Maui.csproj | |
# Publish the NuGet package as an artifact, so they can be used in the following jobs | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: nuget | |
if-no-files-found: error | |
retention-days: 7 | |
path: ${{ env.NuGetDirectory }}/*.nupkg | |
- name: Publish the package to GPR | |
run: dotnet nuget push ${{ env.NuGetDirectory }}/*.nupkg |