Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Hand-written (not auto-generated) — see Build.CI.GitHubActions.cs for the
# rationale (lets us bridge GitHub's NUGET_API_KEY secret to NUKE's
# rationale (lets us bridge GitHub's NUGET_API_KEY secret to Fallout's
# NuGetApiKey parameter, which would otherwise have to share a name).

name: release
Expand All @@ -11,7 +11,6 @@ on:

permissions:
contents: write # for ICreateGitHubRelease (tag + GitHub release)
packages: write # in case we later push to GitHub Packages too

jobs:
release:
Expand All @@ -31,8 +30,8 @@ jobs:
- name: 'Run: Test, Pack, Publish'
run: ./build.cmd Test Pack Publish
env:
# Publish target is GitHub Packages on this fork, not nuget.org.
# GITHUB_TOKEN has packages:write per the permissions block above —
# no separate NuGet API key needed until the project rename.
NuGetApiKey: ${{ secrets.GITHUB_TOKEN }}
# Publish target is nuget.org now that Fallout.* rename has landed (#54).
# NUGET_API_KEY is an API key scoped to push Fallout.* packages, set in
# repo Settings → Secrets and variables → Actions.
NuGetApiKey: ${{ secrets.NUGET_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 1 addition & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ Validation workflows: **`ubuntu-latest`** runs on every PR targeting `main` (wit

**Versioning:** [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning) — configured in `version.json` at the repo root. Major+minor is hand-bumped; patch comes from git-height. `main` is the public-release ref (stable versions); everything else gets prerelease tags. GitVersion is still installed as a transitional helper for `MajorMinorPatchVersion` in `Build.cs`; full removal is a follow-up.

**Release pipeline:** `.github/workflows/release.yml` — triggered on push to `main`, runs `./build.cmd Test Pack Publish`. **Publishes to GitHub Packages** (`https://nuget.pkg.github.com/<owner>/index.json`) using the auto-provided `GITHUB_TOKEN` — no separate NuGet API key is needed.

**Why not nuget.org?** Per Matt's wish, the "Nuke" name cannot be carried over to a successor project. The successor brand is Fallout. Until the breaking-rename phases land (#32, #34), packages stay on this fork's GitHub Packages feed.
**Release pipeline:** `.github/workflows/release.yml` — triggered on push to `main`, runs `./build.cmd Test Pack Publish`. **Publishes to nuget.org** (`https://api.nuget.org/v3/index.json`) under the `Fallout.*` package ID prefix, using the `NUGET_API_KEY` repo secret (a nuget.org API key scoped to push `Fallout.*`). Prefix reservation tracked in [#33](https://github.com/ChrisonSimtian/Fallout/issues/33).

## Conventions worth respecting

Expand Down
12 changes: 4 additions & 8 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,9 @@ from framework in project.GetTargetFrameworks()

[Parameter] [Secret] readonly string NuGetApiKey;

// Publishing to GitHub Packages on this fork until the post-hard-fork
// project rename lands. nuget.org would require the new name and can't
// be done under "Fallout.*" — see project_nuke_strategy memory note.
// Repository owner comes from GITHUB_REPOSITORY_OWNER, automatically set
// by GitHub Actions runners. ChrisonSimtian is the local-dev fallback.
string IPublish.NuGetSource =>
$"https://nuget.pkg.github.com/{EnvironmentInfo.GetVariable("GITHUB_REPOSITORY_OWNER") ?? "ChrisonSimtian"}/index.json";
// Publishing to nuget.org now that the Fallout.* rename has landed (#54).
// Requires NUGET_API_KEY in repo secrets — see release.yml.
string IPublish.NuGetSource => "https://api.nuget.org/v3/index.json";
string IPublish.NuGetApiKey => NuGetApiKey;

Target IPublish.Publish => _ => _
Expand All @@ -148,7 +144,7 @@ IEnumerable<AbsolutePath> NuGetPackageFiles
.Executes(() =>
{
var packagesDirectory = NuGetPackageResolver.GetPackagesDirectory(packagesConfigFile: BuildProjectFile);
var packageDirectories = packagesDirectory.GlobDirectories($"nuke.*/{DefaultDeploymentVersion}");
var packageDirectories = packagesDirectory.GlobDirectories($"fallout.*/{DefaultDeploymentVersion}");
packageDirectories.DeleteDirectories();
});

Expand Down
Loading