Skip to content

Commit 21079f7

Browse files
committed
2 parents 83169d3 + ba41a60 commit 21079f7

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
name: BlazorFluentUI 8
3+
4+
env:
5+
SUBFOLDER: './src/BlazorFluentUI.CoreComponents'
6+
PROJECT: 'BlazorFluentUI.CoreComponents.csproj'
7+
8+
on:
9+
push:
10+
paths:
11+
- 'src/BlazorFluentUI.CoreComponents/**'
12+
branches:
13+
- main
14+
workflow_dispatch:
15+
16+
jobs:
17+
build-and-publish:
18+
runs-on: [self-hosted, webpx, build]
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup .NET
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
dotnet-version: '8.0.x' # Use your required .NET version
27+
28+
- name: Restore dependencies
29+
run: dotnet restore ${{ env.SUBFOLDER }}/${{ env.PROJECT }}
30+
31+
- name: Build (Release)
32+
run: dotnet build ${{ env.SUBFOLDER }}/${{ env.PROJECT }} --configuration Release --no-restore
33+
34+
- name: Pack NuGet package
35+
run: dotnet pack ${{ env.SUBFOLDER }}/${{ env.PROJECT }} --configuration Release --no-build --output ${{ github.workspace }}\nupkgs
36+
37+
- name: Publish to GitHub Packages
38+
run: dotnet nuget push ${{ github.workspace }}\nupkgs\*.nupkg --source "github" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
39+
env:
40+
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
#continue-on-error: true
42+
43+
- name: Upload package as workflow artifact (optional)
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: nupkg
47+
path: ./nupkgs/*.nupkg
48+
49+
- name: Clean up (optional)
50+
run: rm -Force -Recurse ./nupkgs

0 commit comments

Comments
 (0)