diff --git a/.github/workflows/release-guide.yml b/.github/workflows/release-guide.yml index 8cb9970..73676af 100644 --- a/.github/workflows/release-guide.yml +++ b/.github/workflows/release-guide.yml @@ -40,16 +40,11 @@ jobs: echo "NixOS Branding Guide tag version and file version DO NOT match" exit 1 fi - - name: Build Guide + - name: Build release assets run: | - nix build .\#nixos-branding.nixos-branding-guide \ + nix build .\#nixos-branding.release-assets \ --print-build-logs \ - --out-link result-guide - - name: Build Media Kit - run: | - nix build .\#nixos-branding.nixos-media-kit \ - --print-build-logs \ - --out-link result-media-kit + --out-link result-assets - name: Get latest release info id: query-release-info uses: release-flow/keep-a-changelog-action@74931dec7ecdbfc8e38ac9ae7e8dd84c08db2f32 # v3.0.0 @@ -71,15 +66,16 @@ jobs: NOTES: ${{ steps.query-release-info.outputs.release-notes }} run: printf '%s\n' "$NOTES" > release - name: Release - uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1 - with: - name: "NixOS Branding Guide v${{ steps.split.outputs.version }}" - body_path: release - files: | - result-guide/* - result-media-kit/* - make_latest: true - overwrite_files: false + env: + GH_TOKEN: ${{ github.token }} + VERSION: ${{ steps.split.outputs.version }} + run: | + gh release create "$GITHUB_REF_NAME" \ + --title "NixOS Branding Guide v$VERSION" \ + --notes-file release \ + --latest \ + --verify-tag \ + result-assets/* deploy: uses: ./.github/workflows/netlify-deploy.yml diff --git a/package-sets/top-level/nixos-branding/release-assets/package.nix b/package-sets/top-level/nixos-branding/release-assets/package.nix new file mode 100644 index 0000000..8fde1ca --- /dev/null +++ b/package-sets/top-level/nixos-branding/release-assets/package.nix @@ -0,0 +1,32 @@ +{ + artifacts, + lib, + nixos-branding-guide, + symlinkJoin, +}: + +let + + inherit (lib.attrsets) + attrValues + ; + + inherit (lib.nixos-branding) + removeDirectoriesRecursiveAttrs + ; + +in + +# Assets attached to a GitHub release: the branding guide document plus the +# public-facing logos (artifacts.media-kit), flattened into one directory. +# This matches the pre-removal release contents (the old nixos-branding-guide +# + nixos-media-kit uploads) in a single buildable package. It deliberately +# excludes the internal logos and the browsable index.html files that +# deployed-assets adds for the Netlify web deploy. +symlinkJoin { + name = "release-assets"; + paths = [ + nixos-branding-guide + ] + ++ attrValues (removeDirectoriesRecursiveAttrs artifacts.media-kit); +}