You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+70-3
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,73 @@ https://cla.microsoft.com.
11
11
12
12
## Pull requests
13
13
14
-
When you submit a pull request, a CLA-bot will automatically determine whether you need
15
-
to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the
16
-
instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
14
+
## Prerequisites
15
+
16
+
All dependencies can be installed by running the `init.ps1` script at the root of the repository
17
+
using Windows PowerShell or [PowerShell Core][pwsh] (on any OS).
18
+
Some dependencies installed by `init.ps1` may only be discoverable from the same command line environment the init script was run from due to environment variables, so be sure to launch Visual Studio or build the repo from that same environment.
19
+
Alternatively, run `init.ps1 -InstallLocality Machine` (which may require elevation) in order to install dependencies at machine-wide locations so Visual Studio and builds work everywhere.
20
+
21
+
The only prerequisite for building, testing, and deploying from this repository
22
+
is the [.NET SDK](https://get.dot.net/).
23
+
You should install the version specified in `global.json` or a later version within
24
+
the same major.minor.Bxx "hundreds" band.
25
+
For example if 2.2.300 is specified, you may install 2.2.300, 2.2.301, or 2.2.310
26
+
while the 2.2.400 version would not be considered compatible by .NET SDK.
27
+
See [.NET Core Versioning](https://learn.microsoft.com/dotnet/core/versions/) for more information.
28
+
29
+
## Package restore
30
+
31
+
The easiest way to restore packages may be to run `init.ps1` which automatically authenticates
32
+
to the feeds that packages for this repo come from, if any.
33
+
`dotnet restore` or `nuget restore` also work but may require extra steps to authenticate to any applicable feeds.
34
+
35
+
## Building
36
+
37
+
This repository can be built on Windows, Linux, and OSX.
38
+
39
+
Building, testing, and packing this repository can be done by using the standard dotnet CLI commands (e.g. `dotnet build`, `dotnet test`, `dotnet pack`, etc.).
Use `nbgv tag` to create a tag for a particular commit that you mean to release.
46
+
[Learn more about `nbgv` and its `tag` and `prepare-release` commands](https://dotnet.github.io/Nerdbank.GitVersioning/docs/nbgv-cli.html).
47
+
48
+
Push the tag.
49
+
50
+
### GitHub Actions
51
+
52
+
When your repo is hosted by GitHub and you are using GitHub Actions, you should create a GitHub Release using the standard GitHub UI.
53
+
Having previously used `nbgv tag` and pushing the tag will help you identify the precise commit and name to use for this release.
54
+
55
+
After publishing the release, the `.github\workflows\release.yml` workflow will be automatically triggered, which will:
56
+
57
+
1. Find the most recent `.github\workflows\build.yml` GitHub workflow run of the tagged release.
58
+
1. Upload the `deployables` artifact from that workflow run to your GitHub Release.
59
+
1. If you have `NUGET_API_KEY` defined as a secret variable for your repo or org, any nuget packages in the `deployables` artifact will be pushed to nuget.org.
60
+
61
+
### Azure Pipelines
62
+
63
+
When your repo builds with Azure Pipelines, use the `azure-pipelines/release.yml` pipeline.
64
+
Trigger the pipeline by adding the `auto-release` tag on a run of your main `azure-pipelines.yml` pipeline.
65
+
66
+
## Tutorial and API documentation
67
+
68
+
API and hand-written docs are found under the `docfx/` directory. and are built by [docfx](https://dotnet.github.io/docfx/).
69
+
70
+
You can make changes and host the site locally to preview them by switching to that directory and running the `dotnet docfx --serve` command.
71
+
After making a change, you can rebuild the docs site while the localhost server is running by running `dotnet docfx` again from a separate terminal.
72
+
73
+
The `.github/workflows/docs.yml` GitHub Actions workflow publishes the content of these docs to github.io if the workflow itself and [GitHub Pages is enabled for your repository](https://docs.github.com/en/pages/quickstart).
74
+
75
+
## Updating dependencies
76
+
77
+
This repo uses Renovate to keep dependencies current.
78
+
Configuration is in the `.github/renovate.json` file.
79
+
[Learn more about configuring Renovate](https://docs.renovatebot.com/configuration-options/).
80
+
81
+
When changing the renovate.json file, follow [these validation steps](https://docs.renovatebot.com/config-validation/).
82
+
83
+
If Renovate is not creating pull requests when you expect it to, check that the [Renovate GitHub App](https://github.com/apps/renovate) is configured for your account or repo.
0 commit comments