Skip to content

Version 3.4.4.

Version 3.4.4. #2

name: Create NuGet Package
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Build CSS
run: npx grunt less:prod
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Install NuGet CLI
run: |
wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
chmod +x nuget.exe
- name: Create NuGet package
run: |
mono nuget.exe pack .nuspec
- name: List NuGet package contents
run: |
unzip -l *.nupkg
- name: Verify CSS file exists
run: |
if [ ! -f "css/evol-colorpicker.min.css" ]; then
echo "CSS file not found!"
exit 1
fi
- name: Upload NuGet package
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
mono nuget.exe push *.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey $NUGET_API_KEY