Skip to content

Commit f94eec3

Browse files
committed
ci: update workflow for .NET 10 and multi-targeting
- Upgrade dotnet-version from 3.1.x to 10.0.x - Update actions/checkout from v2 to v4 - Update actions/setup-dotnet from v1 to v4 - Switch to ubuntu-latest for faster builds - Fix path separators for cross-platform compatibility
1 parent a3307d4 commit f94eec3

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

.github/workflows/nuget.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ on:
55
types: [closed]
66

77
env:
8-
PROJECT_PATH: 'SentimentAnalyzer/SentimentAnalyzer.csproj'
9-
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output
10-
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json'
8+
PROJECT_PATH: "SentimentAnalyzer/SentimentAnalyzer.csproj"
9+
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}/output
10+
NUGET_SOURCE_URL: "https://api.nuget.org/v3/index.json"
1111

1212
jobs:
1313
merge-PR:
1414
if: github.event.pull_request.merged == true
15-
runs-on: 'windows-latest'
15+
runs-on: "ubuntu-latest"
1616
steps:
17-
- name: 'Checkout'
18-
uses: actions/checkout@v2
17+
- name: "Checkout"
18+
uses: actions/checkout@v4
1919

20-
- name: 'Install dotnet'
21-
uses: actions/setup-dotnet@v1
22-
with:
23-
dotnet-version: '3.1.x'
20+
- name: "Install dotnet"
21+
uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: "10.0.x"
2424

25-
- name: 'Restore packages'
26-
run: dotnet restore ${{ env.PROJECT_PATH }}
25+
- name: "Restore packages"
26+
run: dotnet restore ${{ env.PROJECT_PATH }}
2727

28-
- name: 'Build project'
29-
run: dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release
28+
- name: "Build project"
29+
run: dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release
3030

31-
- name: 'Pack project'
32-
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
31+
- name: "Pack project"
32+
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
3333

34-
- name: 'Push package'
35-
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\*.nupkg -k ${{ secrets.NUGET_AUTH_TOKEN }} -s ${{ env.NUGET_SOURCE_URL }}
34+
- name: "Push package"
35+
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_AUTH_TOKEN }} -s ${{ env.NUGET_SOURCE_URL }}

0 commit comments

Comments
 (0)