Skip to content

Update build.yml

Update build.yml #59

Workflow file for this run

name: Build
on:
push:
tags:
- v4.*
branches:
- v4/dev
pull_request:
branches:
- v4/dev
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4.0.0
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_TOKEN}}
- name: Restore dependencies
run: dotnet restore
- name: Copy lucene analyser
run: |
$src = "C:\Users\runneradmin\.nuget\packages\lucene.net\4.8.0-beta00014\analyzers\dotnet\cs"
$dest = "C:\Users\runneradmin\.nuget\packages\lucene.net\3.0.3\analyzers\dotnet\cs"
if (!(Test-Path -Path $dest)) {
New-Item -ItemType directory -Path $dest
}
Copy-Item -Path $src\*.dll -Destination $dest
- name: Create output dir
run: mkdir nupkgs
- name: NPM install
run: |
cd ./src/Tabulate.Umbraco
npm install
npm run build
- name: Pack
run: |
dotnet pack ./src/Tabulate.Umbraco.ValueConverters/Tabulate.Umbraco.ValueConverters.csproj -c Release -o nupkgs
dotnet pack ./src/Tabulate.Umbraco/Tabulate.Umbraco.csproj -c Release -o nupkgs
- name: Push
if: startsWith(github.ref, 'refs/tags/v4')
run: |
dotnet nuget push "**/nupkgs/*.nupkg" -s https://api.nuget.org/v3/index.json --skip-duplicate -k ${{secrets.NUGET_TOKEN}}
- name: Upload
uses: actions/upload-artifact@v2
with:
path: nupkgs
- name: Clean up
run: rm -r -force nupkgs