Fix: Added stable branch to flake and needed packages (#165)

This commit is contained in:
Edward?
2026-07-23 17:27:13 +03:00
committed by GitHub
parent 19380b0585
commit cb684177fe
6 changed files with 138 additions and 8 deletions
+8 -3
View File
@@ -24,8 +24,11 @@ jobs:
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build package
run: nix build .#default --print-build-logs
- name: Build stable package
run: nix build .#emerald-legacy-launcher --print-build-logs
- name: Build git package
run: nix build .#emerald-legacy-launcher-git --out-link result-git --print-build-logs
- name: Flake check
run: nix flake check --print-build-logs
@@ -33,6 +36,8 @@ jobs:
- name: Verify outputs
run: |
test -x ./result/bin/emerald-legacy-launcher
nix path-info -Sh ./result
test -x ./result-git/bin/emerald-legacy-launcher
nix path-info -Sh ./result ./result-git
ls -la ./result/bin/
ls -la ./result-git/bin/
ls -la ./result/share/applications/ || true
+41
View File
@@ -0,0 +1,41 @@
name: Update Nix Flake (Stable)
on:
release:
types: [published]
jobs:
update-flake:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
- uses: DeterminateSystems/nix-installer-action@main
- name: Prefetch release source and update flake.nix
run: |
TAG="${{ github.event.release.tag_name }}"
VERSION="${TAG#v}"
echo "Processing tag $TAG (version: $VERSION)"
BASE32_HASH=$(nix-prefetch-url --unpack \
"https://github.com/LCE-Hub/LCE-Emerald-Launcher/archive/refs/tags/${TAG}.tar.gz")
SRC_HASH=$(nix hash to-sri --type sha256 "$BASE32_HASH")
echo "stableSrcHash: $SRC_HASH"
python3 scripts/update-nix-stable.py --version "$VERSION" --src-hash "$SRC_HASH"
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add flake.nix
git diff --quiet && git diff --staged --quiet || (
git commit -m "chore: update Nix stable pin to ${{ github.event.release.tag_name }} [skip ci]" &&
git push origin main
)