Skip to content

Commit fced6d5

Browse files
bobaoapaeclaude
andcommitted
Use GITHUB_TOKEN instead of personal token in CI workflow.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e94b496 commit fced6d5

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: [ main ]
88

9+
permissions:
10+
contents: read
11+
packages: write
12+
913
jobs:
1014
build:
1115

@@ -17,20 +21,18 @@ jobs:
1721
uses: actions/setup-dotnet@v4
1822
with:
1923
dotnet-version: 10.0.x
20-
env:
21-
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN }}
2224
- name: Cache
2325
uses: actions/cache@v4
2426
with:
2527
path: ~/.nuget/packages
26-
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} #hash of project files
28+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
2729
restore-keys: |
2830
${{ runner.os }}-nuget-
2931
- name: Add GitHub Packages Source
30-
run: dotnet nuget add source https://nuget.pkg.github.com/bobaoapae/index.json -n github -u ${{secrets.MEU_USER}} -p ${{secrets.MEU_TOKEN}} --store-password-in-clear-text
32+
run: dotnet nuget add source https://nuget.pkg.github.com/bobaoapae/index.json -n github -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
3133
- name: Build with dotnet
3234
run: dotnet build --configuration Release --property:PackageOutputPath=../npkg
3335
- name: Test
3436
run: dotnet test --configuration Release --no-build --verbosity normal
3537
- name: Publish
36-
run: dotnet nuget push "npkg/*.nupkg" -k ${{ secrets.MEU_TOKEN }} -s https://nuget.pkg.github.com/bobaoapae/index.json --skip-duplicate
38+
run: dotnet nuget push "npkg/*.nupkg" -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/bobaoapae/index.json --skip-duplicate

0 commit comments

Comments
 (0)