Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/workflows/nuget-v1-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ name: Build and Publish V1 Legacy

on:
push:
branches:
- V1-legacy
tags:
- 'v1.*'
workflow_dispatch:
inputs:
ref:
description: 'Branch or tag to build (default: V1-legacy)'
required: false
default: 'V1-legacy'

jobs:
build-and-publish:
Expand All @@ -17,6 +20,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }}

- name: Setup .NET Framework
uses: microsoft/setup-msbuild@v2
Expand All @@ -25,10 +30,10 @@ jobs:
uses: nuget/setup-nuget@v2

- name: Restore NuGet packages
run: nuget restore src\J2534-Sharp.csproj
run: nuget restore J2534-Sharp.sln

- name: Build solution
run: msbuild src\J2534-Sharp.csproj /p:Configuration=Release /p:Platform=AnyCPU
run: msbuild J2534-Sharp.sln /p:Configuration=Release /p:Platform=AnyCPU

- name: Determine version
id: version
Expand All @@ -44,7 +49,7 @@ jobs:
echo "VERSION=$version" >> $env:GITHUB_OUTPUT

- name: Pack NuGet package
run: nuget pack J2534-Sharp.nuspec -Version ${{ steps.version.outputs.VERSION }} -Properties configuration=Release -BasePath Src
run: nuget pack J2534-Sharp.nuspec -Version ${{ steps.version.outputs.VERSION }} -Properties configuration=Release

- name: Publish to NuGet.org
if: startsWith(github.ref, 'refs/tags/v1.')
Expand Down