Skip to content

Merge pull request #10315 from bitfoundation/develop #97

Merge pull request #10315 from bitfoundation/develop

Merge pull request #10315 from bitfoundation/develop #97

Workflow file for this run

name: Nuget packages
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- 'src/BlazorUI/**'
- 'src/Bswup/**'
- 'src/Bup/**'
- 'src/Butil/**'
- 'src/CodeAnalyzers/**'
- 'src/SourceGenerators/**'
- 'src/Templates/**'
jobs:
build-publish:
name: build & publish
runs-on: ubuntu-24.04
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: src/global.json
- uses: actions/setup-node@v4
with:
node-version: 23
- name: Delete AssemblyOriginatorKeyFile.snk
run: |
rm src/AssemblyOriginatorKeyFile.snk
- name: Extract strong sign certificate from env
uses: timheuer/[email protected]
with:
fileDir: './src/'
fileName: 'AssemblyOriginatorKeyFile.snk'
encodedString: ${{ secrets.STRONG_SIGN_CERTIFICATE_BASE64 }}
- name: Generate ES2019 based blazor.*.js files
run: |
git clone https://github.com/dotnet/aspnetcore.git
cd aspnetcore
git switch release/9.0
git submodule update --init --recursive
sed -i 's/ES2022/ES2019/g' src/Components/Shared.JS/tsconfig.json
./restore.sh
npm run-script build
cd src/Components/
./build.sh
cd Web.JS
npm run-script build:production
cd ../../../../
cp aspnetcore/src/Components/Web.JS/dist/Release/blazor.*.js src/BlazorES2019/Bit.BlazorES2019/wwwroot/
rm -rf aspnetcore
- name: dotnet pack BlazorES2019
run: |
dotnet build src/BlazorES2019/Bit.BlazorES2019/Bit.BlazorES2019.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
dotnet pack src/BlazorES2019/Bit.BlazorES2019/Bit.BlazorES2019.csproj --output . --configuration Release
- name: Generate CSS/JS files BlazorUI
run: dotnet build src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj -t:BeforeBuildTasks --no-restore -f:net9.0 -c Release
- name: dotnet build BlazorUI
run: dotnet build src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack BlazorUI
run: dotnet pack src/BlazorUI/Bit.BlazorUI/Bit.BlazorUI.csproj --output . --configuration Release
- name: Generate CSS/JS files BlazorUI.Extras
run: dotnet build src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj -t:BeforeBuildTasks --no-restore -f:net9.0 -c Release
- name: dotnet build BlazorUI.Extras
run: dotnet build src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack BlazorUI.Extras
run: dotnet pack src/BlazorUI/Bit.BlazorUI.Extras/Bit.BlazorUI.Extras.csproj --output . --configuration Release
- name: Generate CSS/JS files BlazorUI.Assets
run: dotnet build src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj -t:BeforeBuildTasks --no-restore -f:net9.0 -c Release
- name: dotnet build BlazorUI.Assets
run: dotnet build src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack BlazorUI.Assets
run: dotnet pack src/BlazorUI/Bit.BlazorUI.Assets/Bit.BlazorUI.Assets.csproj --output . --configuration Release
- name: Generate CSS/JS files BlazorUI.Icons
run: dotnet build src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj -t:BeforeBuildTasks --no-restore -f:net9.0 -c Release
- name: dotnet build BlazorUI.Icons
run: dotnet build src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack BlazorUI.Icons
run: dotnet pack src/BlazorUI/Bit.BlazorUI.Icons/Bit.BlazorUI.Icons.csproj --output . --configuration Release
- name: Generate CSS/JS files Bswup
run: dotnet build src/Bswup/Bit.Bswup/Bit.Bswup.csproj -t:BeforeBuildTasks --no-restore -f:net9.0 -c Release
- name: dotnet build Bswup
run: dotnet build src/Bswup/Bit.Bswup/Bit.Bswup.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack Bswup
run: dotnet pack src/Bswup/Bit.Bswup/Bit.Bswup.csproj --output . --configuration Release
- name: Generate CSS/JS files Bup
run: dotnet build src/Bup/Bit.Bup/Bit.Bup.csproj -t:BeforeBuildTasks --no-restore -f:net9.0 -c Release
- name: dotnet build Bup
run: dotnet build src/Bup/Bit.Bup/Bit.Bup.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack Bup
run: dotnet pack src/Bup/Bit.Bup/Bit.Bup.csproj --output . --configuration Release
- name: Generate CSS/JS files Butil
run: dotnet build src/Butil/Bit.Butil/Bit.Butil.csproj -t:BeforeBuildTasks --no-restore -f:net9.0 -c Release
- name: dotnet build Butil
run: dotnet build src/Butil/Bit.Butil/Bit.Butil.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack Butil
run: dotnet pack src/Butil/Bit.Butil/Bit.Butil.csproj --output . --configuration Release
- name: dotnet build Besql
run: dotnet build src/Besql/Bit.Besql/Bit.Besql.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack Besql
run: dotnet pack src/Besql/Bit.Besql/Bit.Besql.csproj --output . --configuration Release
- name: dotnet build CodeAnalyzers
run: dotnet build src/CodeAnalyzers/Bit.CodeAnalyzers/Bit.CodeAnalyzers.csproj -c Release -p:GeneratePackageOnBuild=false -p:WarningLevel=0 -p:RunCodeAnalysis=false
- name: dotnet pack CodeAnalyzer
run: dotnet pack src/CodeAnalyzers/Bit.CodeAnalyzers/Bit.CodeAnalyzers.csproj --output . --configuration Release
- name: build SourceGenerators nupkg file
run: dotnet build src/SourceGenerators/Bit.SourceGenerators/Bit.SourceGenerators.csproj --configuration Release
- name: dotnet pack Boilerplate
run: dotnet pack src/Templates/Boilerplate/Bit.Boilerplate.ProjectTemplate.csproj --output . --configuration Release
- name: dotnet pack BlazorEmpty
run: dotnet pack src/Templates/BlazorEmpty/Bit.BlazorEmpty.ProjectTemplate.csproj --output . --configuration Release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: nupkg-files
path: ./*.nupkg
- name: dotnet nuget push
run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_ORG_API_KEY}} --skip-duplicate