Skip to content

Commit 4ad3925

Browse files
committed
test/test-pipeline-7
1 parent 482329a commit 4ad3925

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

.github/workflows/publish-main.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,18 @@ jobs:
2929
- name: Setup .NET
3030
uses: actions/setup-dotnet@v4
3131
with:
32-
dotnet-version: '8.0.x'
32+
dotnet-version: '8.0.x'
33+
34+
- name: Authenticate GitHub Packages
35+
run: |
36+
dotnet nuget remove source githubanddone --configfile src/AndDoneSecureClientLibrary/nuget.config
37+
dotnet nuget add source \
38+
--username ${{ github.repository_owner }} \
39+
--password ${{ secrets.CLIENT_LIBRARY_NUGET_AUTH_TOKEN }} \
40+
--store-password-in-clear-text \
41+
--name githubanddone \
42+
--configfile src/AndDoneSecureClientLibrary/nuget.config \
43+
"https://nuget.pkg.github.com/AndDone-LLC/index.json"
3344
3445
- name: Restore dependencies
3546
run: dotnet restore
@@ -43,22 +54,11 @@ jobs:
4354
- name: Pack
4455
run: dotnet pack --configuration Release --no-build --output ./nupkg /p:RepositoryUrl=https://github.com/anddone-kit/AndDone-SecureAPI-ClientLibrary-DotNet.git
4556

46-
# Publish to the AndDone-kit account's GitHub Packages
4757
- name: Push to GitHub Packages (Public)
48-
env:
49-
PUBLIC_OWNER: ${{ secrets.PUBLIC_REPO && contains(secrets.PUBLIC_REPO, '/') && '' || '' }}
5058
run: |
51-
# Extract the owner from PUBLIC_REPO (owner/repo-name)
52-
PUBLIC_OWNER=$(echo "${{ secrets.PUBLIC_REPO }}" | cut -d'/' -f1)
53-
54-
dotnet nuget add source \
55-
--username "$PUBLIC_OWNER" \
56-
--password ${{ secrets.CLIENT_LIBRARY_NUGET_AUTH_TOKEN }} \
57-
--store-password-in-clear-text \
58-
--name github-public \
59-
"https://nuget.pkg.github.com/$PUBLIC_OWNER/index.json"
59+
PUBLIC_OWNER=$(echo "${{ vars.PUBLIC_REPO }}" | cut -d'/' -f1)
6060
6161
dotnet nuget push ./nupkg/*.nupkg \
6262
--api-key ${{ secrets.CLIENT_LIBRARY_NUGET_AUTH_TOKEN }} \
63-
--source github-public \
63+
--source "https://nuget.pkg.github.com/$PUBLIC_OWNER/index.json" \
6464
--skip-duplicate

src/AndDoneSecureClientLibrary/AndDoneSecureClientLibrary.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<Description>Client library for AndDone Secure API</Description>
1313
<Copyright>No Copyright</Copyright>
1414
<RootNamespace>AndDoneSecureClientLibrary</RootNamespace>
15-
<Version>1.0.3</Version>
15+
<Version>1.0.4</Version>
1616
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\AndDoneSecureClientLibrary.xml</DocumentationFile>
1717
<RepositoryUrl>https://github.com/AndDone-LLC/AndDone-SecureAPI-ClientLibrary-DotNet-private.git</RepositoryUrl>
1818
<RepositoryType>git</RepositoryType>

0 commit comments

Comments
 (0)