Skip to content

Commit 1b27965

Browse files
Update README.md
1 parent ea6d3b2 commit 1b27965

File tree

1 file changed

+36
-13
lines changed

1 file changed

+36
-13
lines changed

README.md

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ To include both of them in your project based on your build configuration, use t
4141

4242
<PropertyGroup>
4343
<OutputType>Exe</OutputType>
44-
<TargetFramework>net7.0</TargetFramework>
44+
<TargetFramework>net8.0</TargetFramework>
4545
</PropertyGroup>
4646

4747
<ItemGroup>
@@ -52,24 +52,49 @@ To include both of them in your project based on your build configuration, use t
5252
</Project>
5353
```
5454

55-
## GitLab Package Registry
56-
For more up-to-date packages, development builds are available on the [GitLab package registry](https://gitlab.com/BeanCheeseBurrito/Box2D.NET/-/packages). To add the development feed to your project, add the GitLab link below as a restore source. You can now reference any package version listed [here](https://gitlab.com/BeanCheeseBurrito/Box2D.NET/-/packages)!
55+
## GitHub Package Registry
56+
For more up-to-date packages, development builds are available on the [GitHub package registry](https://github.com/BeanCheeseBurrito?tab=packages&repo_name=Box2D.NET). Packages are automatically uploaded on every commit to the main branch.
57+
58+
To access development builds from your project, you first need to create a GitHub personal access token with the ``read:packages`` permission. (See [Creating a personal access token (classic)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic))
59+
60+
Once you have created a personal access token, run the following command to add the GitHub feed as a new package source. Replace ``YOUR_GITHUB_USERNAME`` with your GitHub username and ``YOUR_GITHUB_TOKEN`` with your personal access token.
61+
```bash
62+
dotnet nuget add source --name "box2d.net" --username "YOUR_GITHUB_USERNAME" --password "YOUR_GITHUB_TOKEN" --store-password-in-clear-text "https://nuget.pkg.github.com/BeanCheeseBurrito/index.json"
63+
```
64+
65+
You can now reference any package from the [GitHub feed](https://github.com/BeanCheeseBurrito?tab=packages&repo_name=Box2D.NET)!
66+
67+
```console
68+
dotnet add PROJECT package Box2D.NET.Release --version *-build.*
69+
```
70+
5771
```xml
5872
<Project Sdk="Microsoft.NET.Sdk">
59-
6073
<PropertyGroup>
6174
<OutputType>Exe</OutputType>
62-
<TargetFramework>net7.0</TargetFramework>
63-
<RestoreAdditionalProjectSources>https://gitlab.com/api/v4/projects/53993416/packages/nuget/index.json</RestoreAdditionalProjectSources>
75+
<TargetFramework>net8.0</TargetFramework>
6476
</PropertyGroup>
6577

6678
<ItemGroup>
67-
<PackageReference Include="Box2D.NET.Debug" Version="0.0.4"/>
79+
<PackageReference Include="Box2D.NET.Debug" Version="*-build.*"/>
6880
</ItemGroup>
69-
7081
</Project>
7182
```
72-
> [!WARNING]
83+
___
84+
By default, the GitHub feed will be added to your global ``nuget.config`` file and can be referenced by any project on your machine. If wish to add the feed to a single project/solution, create a ``nuget.config`` file at the root of your project/solution directory and run the following command with the ``--configfile`` option.
85+
```bash
86+
dotnet nuget add source --configfile "./nuget.config" --name "box2d.net" --username "YOUR_GITHUB_USERNAME" --password "YOUR_GITHUB_TOKEN" --store-password-in-clear-text "https://nuget.pkg.github.com/BeanCheeseBurrito/index.json"
87+
```
88+
To remove the GitHub feed from your NuGet package sources, run the following command.
89+
```bash
90+
dotnet nuget remove source "box2d.net"
91+
```
92+
GitHub Actions workflows can be authenticated using the ``GITHUB_TOKEN`` secret.
93+
```yaml
94+
- name: Add GitHub source
95+
run: dotnet nuget add source --name "box2d.net" --username "USERNAME" --password "${{ secrets.GITHUB_TOKEN }}" --store-password-in-clear-text "https://nuget.pkg.github.com/BeanCheeseBurrito/index.json"
96+
```
97+
> [!WARNING]
7398
> Development feed packages may be deleted without warning to free up space.
7499
75100
## Running examples
@@ -110,13 +135,11 @@ Reference the project and import the native libraries.
110135
111136
<PropertyGroup>
112137
<OutputType>Exe</OutputType>
113-
<TargetFramework>net7.0</TargetFramework>
138+
<TargetFramework>net8.0</TargetFramework>
114139
</PropertyGroup>
115140
116-
<Import Project="PATH/Box2D.NET/Box2D.NET.Native/Box2D.NET.Native.targets" />
117-
118141
<ItemGroup>
119-
<ProjectReference Include="PATH/Box2D.NET/Box2D.NET/Box2D.NET.csproj" />
142+
<ProjectReference Include="PATH/Box2D.NET/Box2D.NET/Box2D.NET.csproj"/>
120143
</ItemGroup>
121144
122145
</Project>

0 commit comments

Comments
 (0)