Skip to content

Commit 5cce838

Browse files
authored
Revise packaging documentation for AndDone Client Library
Updated the packaging documentation for the AndDone Client Library to include detailed steps for creating and pushing NuGet packages using both command line and Visual Studio. Improved formatting and clarity of instructions.
1 parent 5afd5b3 commit 5cce838

1 file changed

Lines changed: 81 additions & 161 deletions

File tree

documentation/packaging.md

Lines changed: 81 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -1,168 +1,88 @@
1-
\## Packaging
2-
1+
# AndDone Client Library - .NET - Packaging
32

3+
## Packaging
44

55
The GitHub Container Repository (GHCR) will be used to house the NuGet package for client consumption.
66

7-
8-
9-
1\. Create a GitHub Personal Access Token (PAT)
10-
11-
  1. Login to GitHub
12-
13-
  2. Select User -> Settings -> Developer Settings -> Personal access tokens -> Tokens (classic)
14-
15-
  3. select Generate new token -> Generate new token (classic)
16-
17-
  4. Give an identifiable description name
18-
19-
  5. Copy Token to be used below as GH\_PAT
20-
21-
  6. Add the GHCR reference to the local machine by running:
22-
23-
  dotnet nuget add source --username {GH\_USER} --password {GH\_PAT} --store-password-in-clear-text --name githubanddone "https://nuget.pkg.github.com/AndDone-LLC/index.json"
24-
25-
26-
27-
2\. Create Package and Push (command line)
28-
29-
  1. Open a Powershell window
30-
31-
  2. Create a new folder in the workspace folder of choice (ex: d:\\workspace\\anddone)
32-
33-
  ```sh
34-
35-
  cd d:\\workspace
36-
37-
  mkdir anddoneclientlibrary
38-
39-
  ```
40-
41-
  4. Change to the new folder
42-
43-
  ```sh
44-
45-
  cd anddoneclientlibrary
46-
47-
  ```
48-
49-
  5. Clone the repository
50-
51-
  ```sh
52-
53-
  git clone https://github.com/AndDone-LLC/AndDone-SecureAPI-ClientLibrary-DotNet-private.git
54-
55-
  ````
56-
57-
  6. Open nuget.config file in the Project root (AndDone-SecureAPI-ClientLibrary-DotNet-private\\src\\AndDoneSecureClientLibrary) and modify {GH\_USER} and {GH\_PAT}
58-
59-
&nbsp; 7. Verify the <RepositoryUrl> in .csproj file is correct
60-
61-
&nbsp; 8. Update the Version in .csproj as needed
62-
63-
&nbsp; 7. Navigate to AndDone-SecureAPI-ClientLibrary-DotNet-private\\src\\AndDoneSecureClientLibrary
64-
65-
&nbsp; ```sh
66-
67-
&nbsp; cd src\\AndDoneSecureClientLibrary
68-
69-
&nbsp; ```
70-
71-
&nbsp; 9. Package the project to create the .nupkg file
72-
73-
&nbsp; ```sh
74-
75-
&nbsp; dotnet pack --configuration Release
76-
77-
&nbsp; ```
78-
79-
&nbsp; 10. Push the package to GHCR
80-
81-
&nbsp; ```sh
82-
83-
&nbsp; dotnet nuget push "bin\\Release\\AndDoneSecureClientLibrary.1.0.0.nupkg" --api-key {GH\_PAT} --source "githubanddone" --skip-duplicate
84-
85-
&nbsp; ```
86-
87-
88-
89-
3\. Create Package and Push (Visual Studio)
90-
91-
&nbsp; 1. Open a Powershell window
92-
93-
&nbsp; 2. Create a new folder in the workspace folder of choice (ex: d:\\workspace\\anddone)
94-
95-
&nbsp; ```sh
96-
97-
&nbsp; cd d:\\workspace
98-
99-
&nbsp; mkdir anddoneclientlibrary
100-
101-
&nbsp; ```
102-
103-
&nbsp; 4. Change to the new folder
104-
105-
&nbsp; ```sh
106-
107-
&nbsp; cd anddoneclientlibrary
108-
109-
&nbsp; ```
110-
111-
&nbsp; 5. Clone the repository
112-
113-
&nbsp; ```sh
114-
115-
&nbsp; git clone https://github.com/AndDone-LLC/AndDone-SecureAPI-ClientLibrary-DotNet-private.git
116-
117-
&nbsp; ````
118-
119-
&nbsp; 6. Open AndDoneSecureClientLibrary.sln
120-
121-
&nbsp; 7. Change the build configuration dropdown to Release
122-
123-
&nbsp; 4. Modify nuget.config file in Project root with {GH\_USER} and {GH\_PAT}
124-
125-
&nbsp; 5. Verify <RepositoryUrl> in the .csproj file is correct
126-
127-
&nbsp; 6. Update Version in the .csproj as needed
128-
129-
&nbsp; 7. Right click on Solution in Solution Explorer and Build Solution
130-
131-
&nbsp; 8. Right click on the Project in Solution Explorer and Pack
132-
133-
&nbsp; 9. In the Powershell window
134-
135-
&nbsp; ```sh
136-
137-
&nbsp; cd AndDone-SecureAPI-ClientLibrary-DotNet-private\\src\\AndDoneSecureClientLibrary
138-
139-
&nbsp; ```
140-
141-
&nbsp; 10. Push the package to GHCR
142-
143-
&nbsp; ```sh
144-
145-
&nbsp; dotnet nuget push "bin\\Release\\AndDoneSecureClientLibrary.1.0.0.nupkg" --api-key {GH\_PAT} --source "githubanddone" --skip-duplicate
146-
147-
&nbsp; ```
148-
149-
150-
151-
4\. Associate Package to Repository
152-
153-
&nbsp; 1. In GitHub -> Select User -> Organizations
154-
155-
&nbsp; 2. Select AndDone-LLC
156-
157-
&nbsp; 3. Click Packages in top menu
158-
159-
&nbsp; 4. Click Package Name
160-
161-
&nbsp; 5. In right side, Click Package Settings
162-
163-
&nbsp; 6. Click Add Repository and select Repository for Package
164-
165-
&nbsp; 7. Verify by going to GitHub code page and the Package will be listed on the right side
7+
1. Create a GitHub Personal Access Token (PAT)
8+
1. Login to GitHub
9+
2. Select User -> Settings -> Developer Settings -> Personal access tokens -> Tokens (classic)
10+
3. select Generate new token -> Generate new token (classic)
11+
4. Give an identifiable description name
12+
5. Copy Token to be used below as GH_PAT
13+
6. Add the GHCR reference to the local machine by running:
14+
dotnet nuget add source --username {GH_USER} --password {GH_PAT} --store-password-in-clear-text --name githubanddone "https://nuget.pkg.github.com/AndDone-LLC/index.json"
15+
16+
2. Create Package and Push (command line)
17+
1. Open a Powershell window
18+
2. Create a new folder in the workspace folder of choice (ex: d:\workspace\anddone)
19+
```sh
20+
cd d:\workspace
21+
mkdir anddoneclientlibrary
22+
```
23+
3. Change to the new folder
24+
```sh
25+
cd anddoneclientlibrary
26+
```
27+
4. Clone the repository
28+
```sh
29+
git clone https://github.com/AndDone-LLC/AndDone-SecureAPI-ClientLibrary-DotNet-private.git
30+
````
31+
5. Open nuget.config file in the Project root (AndDone-SecureAPI-ClientLibrary-DotNet-private\src\AndDoneSecureClientLibrary) and modify {GH_USER} and {GH_PAT}
32+
6. Verify the <RepositoryUrl> in .csproj file is correct
33+
7. Update the Version in .csproj as needed
34+
8. Navigate to AndDone-SecureAPI-ClientLibrary-DotNet-private\src\AndDoneSecureClientLibrary
35+
```sh
36+
cd src\AndDoneSecureClientLibrary
37+
```
38+
9. Package the project to create the .nupkg file
39+
```sh
40+
dotnet pack --configuration Release
41+
```
42+
10. Push the package to GHCR
43+
```sh
44+
dotnet nuget push "bin\Release\AndDoneSecureClientLibrary.1.0.0.nupkg" --api-key {GH_PAT} --source "githubanddone" --skip-duplicate
45+
```
46+
47+
3. Create Package and Push (Visual Studio)
48+
1. Open a Powershell window
49+
2. Create a new folder in the workspace folder of choice (ex: d:\workspace\anddone)
50+
```sh
51+
cd d:\workspace
52+
mkdir anddoneclientlibrary
53+
```
54+
3. Change to the new folder
55+
```sh
56+
cd anddoneclientlibrary
57+
```
58+
4. Clone the repository
59+
```sh
60+
git clone https://github.com/AndDone-LLC/AndDone-SecureAPI-ClientLibrary-DotNet-private.git
61+
````
62+
5. Open AndDoneSecureClientLibrary.sln
63+
6. Change the build configuration dropdown to Release
64+
7. Modify nuget.config file in Project root with {GH_USER} and {GH_PAT}
65+
8. Verify <RepositoryUrl> in the .csproj file is correct
66+
9. Update Version in the .csproj as needed
67+
10. Right click on Solution in Solution Explorer and Build Solution
68+
11. Right click on the Project in Solution Explorer and Pack
69+
12. In the Powershell window
70+
```sh
71+
cd AndDone-SecureAPI-ClientLibrary-DotNet-private\src\AndDoneSecureClientLibrary
72+
```
73+
13. Push the package to GHCR
74+
```sh
75+
dotnet nuget push "bin\Release\AndDoneSecureClientLibrary.1.0.0.nupkg" --api-key {GH_PAT} --source "githubanddone" --skip-duplicate
76+
```
77+
78+
4. Associate Package to Repository
79+
1. In GitHub -> Select User -> Organizations
80+
2. Select AndDone-LLC
81+
3. Click Packages in top menu
82+
4. Click Package Name
83+
5. In right side, Click Package Settings
84+
6. Click Add Repository and select Repository for Package
85+
7. Verify by going to GitHub code page and the Package will be listed on the right side
16686

16787

16888

0 commit comments

Comments
 (0)