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
{{ message }}
Repository navigation
Commit f49bfbc
Browse filesBrowse the repository at this point in the historyBrowse files
SPDX-FileCopyrightText: 2024-2025 Friedrich von Never <friedrich@fornever.me>
2
+
SPDX-FileCopyrightText: 2024-2026 Friedrich von Never <friedrich@fornever.me>
3
3
4
4
SPDX-License-Identifier: MIT
5
5
-->
@@ -15,27 +15,28 @@ Publish a New Version
15
15
4. Prepare a corresponding entry in the `CHANGELOG.md` file (usually by renaming the "Unreleased" section).
16
16
5. Set `<Version>` in the `Directory.Build.props` file.
17
17
6. Merge the aforementioned changes via a pull request.
18
-
7.Check if the NuGet keys are still valid (see the **Rotate NuGet Publishing Keys**section if they aren't).
18
+
7.If you want to publish a new package (not a new version, but a new project/package) change the NuGet Trusted Publishing Policy: switch from **push only new packages versions**to **push new packages and package versions** (see below for more details).
19
19
8. Push a tag in form of `v<VERSION>`, e.g. `v0.0.0`. GitHub Actions will do the rest (push a NuGet packages).
20
-
21
-
Rotate NuGet Publishing Keys
22
-
----------------------------
23
-
CI relies on NuGet API keys being added to the secrets.
24
-
From time to time, these keys require maintenance: they will become obsolete and will have to be updated.
25
-
26
-
To update the key:
27
-
28
-
1. Sign in onto nuget.org.
29
-
2. Go to the [API keys][nuget.api-keys] section.
30
-
3. Update the existing or create a new key named `truepath.github` with a permission to **Push only new package versions** and only allowed to publish the package **TruePath**.
31
-
32
-
(If this is the first publication of a new package,
33
-
upload a temporary short-living key with permission to add new packages and rotate it afterward.)
34
-
4. Update the existing or create a new key named `truepath.systemio.github` with a permission to **Push only new package versions** and only allowed to publish the package **TruePath.SystemIo**.
35
-
36
-
(If this is the first publication of a new package,
37
-
upload a temporary short-living key with permission to add new packages and rotate it afterward.)
38
-
5. Paste the generated keys, correspondingly, to the `NUGET_TOKEN_TRUE_PATH` and `NUGET_TOKEN_TRUE_PATH_SYSTEM_IO` variables on the [action secrets][github.secrets] section of GitHub settings.
39
-
20
+
9. If you were publishing a new package, revert back the change you did at step 8.
21
+
22
+
NuGet Publishing Policy
23
+
-----------------------
24
+
This repository relies on [NuGet Trusted Publishing][docs.nuget-trusted-publishing] policy. In case you need to create it again, follow these steps:
25
+
26
+
1. Sign in to nuget.org.
27
+
2. Go to the [Trusted Publishing][nuget.trusted-publishing] section.
28
+
3. Create a new policy:
29
+
-**Policy Name:**`github.truepath`.
30
+
-**Repository Owner:**`ForNeVeR`.
31
+
-**Repository**: `TruePath`.
32
+
-**Workflow File**: `release.yml`.
33
+
-**Environment:**_leave empty_.
34
+
-**Scope:****push only new packages versions**.
35
+
-**Glob Patterns and Packages**: `TruePath*`.
36
+
4. Put your nuget.org username into the `NUGET_USER` variable on the [action secrets][github.secrets] section of GitHub settings.
37
+
38
+
When introducing a new package, you can adjust the policy temporarily to allow it to **push new packages and package versions**.
0 commit comments