From b13130f9fa86c7650d607f826738415c5a981d73 Mon Sep 17 00:00:00 2001 From: PolinaSavelyeva Date: Sat, 18 Nov 2023 17:33:53 +0300 Subject: [PATCH 1/2] Fix nuget publish --- Content/Library/.github/workflows/publish.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Content/Library/.github/workflows/publish.yml b/Content/Library/.github/workflows/publish.yml index 4e46a4d3..35c0fb6b 100644 --- a/Content/Library/.github/workflows/publish.yml +++ b/Content/Library/.github/workflows/publish.yml @@ -11,6 +11,8 @@ jobs: # Sets permissions of the GITHUB_TOKEN to allow release creating permissions: contents: write + environment: + name: nuget runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From ac1553af570ec00f46a12b7c6937eb79624c1919 Mon Sep 17 00:00:00 2001 From: PolinaSavelyeva Date: Sat, 18 Nov 2023 17:49:50 +0300 Subject: [PATCH 2/2] Update library's README --- Content/Library/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Content/Library/README.md b/Content/Library/README.md index 94a66533..c7c49c1d 100644 --- a/Content/Library/README.md +++ b/Content/Library/README.md @@ -103,9 +103,9 @@ git remote add origin https://github.com/MyGithubUsername/MyLib.1.git git push -u origin MyReleaseBranch ``` -- [Create your NuGeT API key](https://docs.microsoft.com/en-us/nuget/nuget-org/publish-a-package#create-api-keys) - - Add your NuGet API key as repository secret NUGET_TOKEN to [Actions secrets](https://github.com/MyGithubUsername/MyLib.1/settings/secrets/actions) - +- [Create an Environment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#creating-an-environment) on your repository named `nuget`. +- [Create a NuGet API key](https://learn.microsoft.com/en-us/nuget/nuget-org/publish-a-package#create-an-api-key) +- Add your `NUGET_TOKEN` to the [Environment Secrets](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#environment-secrets) of your newly created environment. - Then update the `CHANGELOG.md` with an "Unreleased" section containing release notes for this version, in [KeepAChangelog](https://keepachangelog.com/en/1.1.0/) format. NOTE: Its highly recommend to add a link to the Pull Request next to the release note that it affects. The reason for this is when the `RELEASE` target is run, it will add these new notes into the body of git commit. GitHub will notice the links and will update the Pull Request with what commit referenced it saying ["added a commit that referenced this pull request"](https://github.com/TheAngryByrd/MiniScaffold/pull/179#ref-commit-837ad59). Since the build script automates the commit message, it will say "Bump Version to x.y.z". The benefit of this is when users goto a Pull Request, it will be clear when and which version those code changes released. Also when reading the `CHANGELOG`, if someone is curious about how or why those changes were made, they can easily discover the work and discussions.