Skip to content

Commit cd158b8

Browse files
committed
fix pipelines
1 parent 8ca62be commit cd158b8

4 files changed

Lines changed: 21 additions & 3 deletions

File tree

.github/workflows/build.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ on:
77
- main
88
workflow_dispatch: {}
99

10+
permissions:
11+
packages: read
12+
1013
env:
1114
DOTNET_VERSION: '10.0.x'
15+
NUGET_REGISTRY_URL: https://nuget.pkg.github.com/devpikachu/index.json
16+
NUGET_REGISTRY_USERNAME: devpikachu
1217

1318
jobs:
1419
build:
@@ -27,6 +32,8 @@ jobs:
2732
uses: actions/setup-dotnet@v5
2833
with:
2934
dotnet-version: ${{ env.DOTNET_VERSION }}
35+
- name: Add NuGet repository
36+
run: dotnet nuget add source --name github --username $NUGET_REGISTRY_USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text $NUGET_REGISTRY_URL
3037
- name: Restore dependencies from cache
3138
uses: actions/cache@v5
3239
with:

.github/workflows/publish.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
uses: actions/setup-dotnet@v5
2929
with:
3030
dotnet-version: ${{ env.DOTNET_VERSION }}
31+
- name: Add NuGet repository
32+
run: dotnet nuget add source --name github --username $NUGET_REGISTRY_USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text $NUGET_REGISTRY_URL
3133
- name: Restore dependencies from cache
3234
uses: actions/cache@v5
3335
with:
@@ -40,6 +42,4 @@ jobs:
4042
- name: Build
4143
run: bash build.sh --target Package --general-project ${{ matrix.project }} --general-version $GITHUB_REF_NAME
4244
- name: Publish
43-
run: |
44-
dotnet nuget add source --name github --username $NUGET_REGISTRY_USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text $NUGET_REGISTRY_URL
45-
dotnet nuget push --source github out/*.nupkg
45+
run: dotnet nuget push --source github out/*.nupkg

.github/workflows/release.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ permissions:
88

99
env:
1010
DOTNET_VERSION: '10.0.x'
11+
NUGET_REGISTRY_URL: https://nuget.pkg.github.com/devpikachu/index.json
12+
NUGET_REGISTRY_USERNAME: devpikachu
1113

1214
jobs:
1315
build:
@@ -20,6 +22,8 @@ jobs:
2022
uses: actions/setup-dotnet@v5
2123
with:
2224
dotnet-version: ${{ env.DOTNET_VERSION }}
25+
- name: Add NuGet repository
26+
run: dotnet nuget add source --name github --username $NUGET_REGISTRY_USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text $NUGET_REGISTRY_URL
2327
- name: Restore dependencies from cache
2428
uses: actions/cache@v5
2529
with:

.github/workflows/test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ on:
77
- main
88
workflow_dispatch: {}
99

10+
permissions:
11+
packages: read
12+
1013
env:
1114
DOTNET_VERSION: '10.0.x'
15+
NUGET_REGISTRY_URL: https://nuget.pkg.github.com/devpikachu/index.json
16+
NUGET_REGISTRY_USERNAME: devpikachu
1217

1318
jobs:
1419
build:
@@ -21,6 +26,8 @@ jobs:
2126
uses: actions/setup-dotnet@v5
2227
with:
2328
dotnet-version: ${{ env.DOTNET_VERSION }}
29+
- name: Add NuGet repository
30+
run: dotnet nuget add source --name github --username $NUGET_REGISTRY_USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text $NUGET_REGISTRY_URL
2431
- name: Restore dependencies from cache
2532
uses: actions/cache@v5
2633
with:

0 commit comments

Comments
 (0)