Skip to content

Commit

Permalink
add release info
Browse files Browse the repository at this point in the history
the flake now has another package output `release-info` that will report
the versions it was built with (php, uwsgi, nixos and nextcloud).

bump github actions too
  • Loading branch information
gdamjan committed Dec 16, 2023
1 parent 586e4e6 commit 59b46a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
sh -c 'sha256sum $0 > $0.sha256' ${{ env.ARTIFACT_PREFIX }}_*.raw
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
retention-days: 5
Expand All @@ -39,6 +39,9 @@ jobs:
${{ env.ARTIFACT_PREFIX }}_*.raw.sha256
name: ${{ env.ARTIFACT_PREFIX }}

- name: Release Info
run: nix build --no-update-lock-file .#release-info

- name: Create a github release from tag
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
Expand All @@ -47,3 +50,4 @@ jobs:
files: |
${{ env.ARTIFACT_PREFIX }}_*.raw
${{ env.ARTIFACT_PREFIX }}_*.raw.sha256
body_path: result
8 changes: 8 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@
outputs = { self, nixpkgs, ... }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
nixos = (nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = []; }).config.system.nixos;
ttRss = (import ./tt-rss.nix { inherit pkgs; });
in {
packages.x86_64-linux.default = (import ./build.nix { inherit pkgs ttRss; withSystemd = false; });
packages.x86_64-linux.release-info = pkgs.writeText "release-info.txt" ''
php: ${pkgs.php.version}
uwsgi: ${pkgs.uwsgi.version}
tt-rss: ${ttRss.version}
${nixos.distroName} ${nixos.release} (${nixos.codeName})
${nixos.distroId} ${nixos.label}
'';
};
}

0 comments on commit 59b46a7

Please sign in to comment.