-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from TheEightBot/feature/update-build
feat: Update NuGet workflow
- Loading branch information
Showing
1 changed file
with
47 additions
and
32 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,37 +3,52 @@ | |
|
||
name: .NET | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v**' | ||
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.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 }} AuroraControlsMaui/AuroraControls.csproj | ||
|
||
- name: Publish the package to GPR | ||
run: dotnet nuget push AuroraControlsMaui/bin/Release/*.nupkg | ||
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 | ||
|
||
- name: Publish the package to GPR | ||
run: | | ||
foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) { | ||
dotnet nuget push $file | ||
} | ||
# 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 |