Skip to content

Commit 6a11824

Browse files
committed
fix: windows-2019 deprecate
1 parent c7a3705 commit 6a11824

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,30 @@ on:
1212

1313
jobs:
1414
build:
15-
runs-on: windows-2019
15+
runs-on: windows-latest
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Setup MSBuild
22-
uses: microsoft/setup-msbuild@v1.1
22+
uses: microsoft/setup-msbuild@v2
2323

2424
- name: Setup NuGet
25-
uses: NuGet/setup-nuget@v1.0.5
25+
uses: nuget/setup-nuget@v2
26+
27+
# PASO CLAVE: instalar los assemblies de referencia de .NET 4.0
28+
- name: Install .NET 4.0 Targeting Pack via NuGet
29+
run: |
30+
nuget install Microsoft.NETFramework.ReferenceAssemblies.net40 -Version 1.0.3 -OutputDirectory c:\refs
31+
xcopy /E /I c:\refs\Microsoft.NETFramework.ReferenceAssemblies.net40.1.0.3\build\.NETFramework "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework"
2632
2733
- name: Restore NuGet packages
2834
run: nuget restore NotAORM.sln
2935

3036
- name: Build solution in Release
3137
run: msbuild NotAORM.sln -t:rebuild -property:Configuration=Release -property:Platform="Any CPU"
3238

33-
# Opcional: copiar artifacts a un directorio staging
3439
- name: Copy artifacts to staging
3540
run: |
3641
mkdir staging
@@ -57,12 +62,10 @@ jobs:
5762
& $signtool sign /f "${{ runner.temp }}\NotAORM.pfx" /p "${{ secrets.PFX_PASSWORD }}" /fd SHA256 /t http://timestamp.digicert.com staging\NotAORM.dll
5863
shell: powershell
5964

60-
# Empaquetar para release
6165
- name: Package artifacts (only on tags)
6266
if: startsWith(github.ref, 'refs/tags/')
6367
run: Compress-Archive -Path staging\* -DestinationPath NotAORM-${{ github.ref_name }}.zip
6468

65-
# Publicar en GitHub Releases
6669
- name: Create GitHub Release and upload asset
6770
if: startsWith(github.ref, 'refs/tags/')
6871
uses: softprops/action-gh-release@v1

0 commit comments

Comments
 (0)