Skip to content

Commit f95dffe

Browse files
committed
ci: update CI workflow and solution for NuGet-only publishing
- Upgrade GitHub Actions runner to windows-2022 and update action versions. - Remove GitHub Packages feed support; publish only to NuGet using NUGET_TOKEN.
1 parent 1abdc30 commit f95dffe

File tree

2 files changed

+12
-22
lines changed

2 files changed

+12
-22
lines changed

.github/workflows/ci-workflow.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,17 @@ env:
1717
DOTNET_CLI_TELEMETRY_OPTOUT: true
1818
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
1919

20-
# GitHub Packages Feed settings
21-
GITHUB_FEED: https://nuget.pkg.github.com/yv989c/index.json
22-
GITHUB_USER: yv989c
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24-
LOCAL_NUGET_PAT: ${{ secrets.LOCAL_NUGET_PAT }}
25-
2620
# Official NuGet Feed settings
2721
NUGET_FEED: https://api.nuget.org/v3/index.json
2822
NUGET_USER: yv989c
2923
NUGET_TOKEN: ${{ secrets.NUGET_KEY }}
3024

3125
jobs:
3226
build:
33-
runs-on: windows-latest
27+
runs-on: windows-2022
3428
steps:
3529
- name: Checkout
36-
uses: actions/checkout@v3
30+
uses: actions/checkout@v6
3731

3832
- name: Restore
3933
run: dotnet restore BlazarTech.QueryableValues.sln
@@ -49,36 +43,31 @@ jobs:
4943
run: dotnet build BlazarTech.QueryableValues.SqlServer.sln -c Release --no-restore
5044

5145
- name: Upload Artifacts
52-
uses: actions/upload-artifact@v3
46+
uses: actions/upload-artifact@v6
5347
with:
5448
name: nupkg
5549
path: ./src/QueryableValues.SqlServer.EFCore*/bin/Release/*.nupkg
5650
prerelease:
5751
needs: build
5852
if: github.ref == 'refs/heads/develop'
59-
runs-on: windows-latest
53+
runs-on: windows-2022
6054
steps:
6155
- name: Download Artifact
62-
uses: actions/download-artifact@v3
56+
uses: actions/download-artifact@v7
6357
with:
6458
name: nupkg
65-
- name: Push to GitHub Feed
59+
- name: Push to NuGet Feed
6660
run: |
67-
dotnet nuget add source --username $env:GITHUB_USER --password $env:GITHUB_TOKEN --store-password-in-clear-text --name github "$env:GITHUB_FEED" &&
68-
dotnet nuget push "**/*.nupkg" --api-key $env:LOCAL_NUGET_PAT --source github --skip-duplicate
61+
dotnet nuget push "**/*.nupkg" --api-key $env:NUGET_TOKEN --source $env:NUGET_FEED --skip-duplicate
6962
deploy:
7063
needs: build
7164
if: github.event_name == 'release'
72-
runs-on: windows-latest
65+
runs-on: windows-2022
7366
steps:
7467
- name: Download Artifact
75-
uses: actions/download-artifact@v3
68+
uses: actions/download-artifact@v7
7669
with:
7770
name: nupkg
78-
- name: Push to GitHub Feed
79-
run: |
80-
dotnet nuget add source --username $env:GITHUB_USER --password $env:GITHUB_TOKEN --store-password-in-clear-text --name github "$env:GITHUB_FEED" &&
81-
dotnet nuget push "**/*.nupkg" --api-key $env:LOCAL_NUGET_PAT --source github --skip-duplicate
8271
- name: Push to NuGet Feed
8372
run: |
8473
dotnet nuget push "**/*.nupkg" --api-key $env:NUGET_TOKEN --source $env:NUGET_FEED --skip-duplicate

BlazarTech.QueryableValues.sln

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.0.31912.275
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.1.11304.174 d18.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QueryableValues.SqlServer.EFCore6", "src\QueryableValues.SqlServer.EFCore6\QueryableValues.SqlServer.EFCore6.csproj", "{BD913E54-FD19-468D-A9D3-1E9608F12D46}"
77
EndProject
@@ -21,6 +21,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QueryableValues.SqlServer.T
2121
EndProject
2222
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5A74EE6E-4DBD-4176-A5E0-12C87C813658}"
2323
ProjectSection(SolutionItems) = preProject
24+
.github\workflows\ci-workflow.yml = .github\workflows\ci-workflow.yml
2425
src\SharedProjectProperties.xml = src\SharedProjectProperties.xml
2526
tests\SharedTestProjectProperties.xml = tests\SharedTestProjectProperties.xml
2627
Version.xml = Version.xml

0 commit comments

Comments
 (0)