Skip to content

Commit 37e7af4

Browse files
committed
Update workflow branches to 'main'
Update NuGet publish step in CI workflow
1 parent 7ee1201 commit 37e7af4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/build-and-test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: build and test
33
on:
44
push:
55
branches:
6-
- winrt
6+
- main
77
pull_request:
88
branches:
9-
- winrt
9+
- main
1010
workflow_dispatch:
1111

1212
env:
@@ -17,7 +17,6 @@ jobs:
1717
name: build-and-pack
1818
runs-on: windows-latest
1919
env:
20-
Nuget_Source: https://nuget.pkg.github.com/SharpAdb/index.json
2120
Solution_Name: AdvancedSharpAdbClient.WinRT/AdvancedSharpAdbClient.WinRT.csproj
2221

2322
steps:
@@ -47,7 +46,10 @@ jobs:
4746

4847
- name: Publish
4948
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
50-
run: dotnet nuget push nugets/**.nupkg --source "$env:Nuget_Source" --skip-duplicate --api-key ${{ secrets.NUGET_KEY }}
49+
run: dotnet nuget push nugets/**.nupkg --source $env:NUGET_SOURCE --skip-duplicate --api-key $env:GITHUB_TOKEN
50+
env:
51+
NUGET_SOURCE: https://nuget.pkg.github.com/SharpAdb/index.json
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5153

5254
- name: Upload
5355
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)