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
8 changes: 8 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ cd LinuxFiles
scripts/linux/install-local.sh
```

### Nightly builds

Every merge to `linux/main` publishes a tarball and AppImage to the rolling [nightly pre-release](https://github.com/MemerGamer/LinuxFiles/releases/tag/nightly). Run it with:

```sh
curl -LO https://github.com/MemerGamer/LinuxFiles/releases/download/nightly/LinuxFiles-nightly-x86_64.AppImage && chmod +x LinuxFiles-nightly-x86_64.AppImage && ./LinuxFiles-nightly-x86_64.AppImage
```

See [docs/linux-port/packaging.md](../docs/linux-port/packaging.md) for packaging details and [docs/linux-port/PLAN.md](../docs/linux-port/PLAN.md) for the roadmap.

## Reporting bugs
Expand Down
119 changes: 119 additions & 0 deletions .github/workflows/nightly-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Copyright (c) Files Community
# Licensed under the MIT License.

# Abstract:
# Builds the self-contained linux-x64 tarball and AppImage on every push to linux/main and publishes them to
# one rolling "nightly" GitHub pre-release with stable asset names. Pull requests targeting linux/main get the
# same build as workflow artifacts only (read-only token). The Flatpak is left to package-linux.yml.

name: Nightly Linux

on:
workflow_dispatch:
push:
branches:
- linux/main
pull_request:
branches:
- linux/main

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || 'nightly' }}
cancel-in-progress: true

permissions:
contents: read

jobs:

build-linux-x64:

runs-on: ubuntu-latest

steps:

- name: Checkout the repository
uses: actions/checkout@v6

- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: global.json

- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/Directory.Packages.props') }}
restore-keys: |
${{ runner.os }}-nuget-

- name: Publish self-contained linux-x64
run: scripts/linux/publish.sh --rid linux-x64 --tarball

- name: Build AppImage
run: packaging/linux/appimage/build-appimage.sh

- name: Stage assets with stable names
run: |
mkdir -p dist
cp artifacts/files-linux-x64.tar.gz dist/LinuxFiles-nightly-linux-x64.tar.gz
cp artifacts/Files-x86_64.AppImage dist/LinuxFiles-nightly-x86_64.AppImage

- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: linuxfiles-nightly-linux-x64
path: dist/*
if-no-files-found: error

publish-nightly:

if: github.event_name != 'pull_request' && github.ref == 'refs/heads/linux/main'
needs: build-linux-x64
runs-on: ubuntu-latest
permissions:
contents: write

steps:

- name: Checkout the repository
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Download packages
uses: actions/download-artifact@v4
with:
name: linuxfiles-nightly-linux-x64
path: dist

- name: Replace the nightly release
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
SHA: ${{ github.sha }}
run: |
short="${SHA:0:7}"

# Commit list since the previous nightly (falls back to the last 20 commits).
prev="$(gh api "repos/$REPO/git/ref/tags/nightly" --jq '.object.sha' 2>/dev/null || true)"
if [ -n "$prev" ] && git cat-file -e "$prev^{commit}" 2>/dev/null; then
range="$prev..$SHA"
else
range="-20 $SHA"
fi
{
echo "Rolling build of \`linux/main\` at $SHA. Replaced on every push; not for production use."
echo
echo "Run the AppImage: \`chmod +x LinuxFiles-nightly-x86_64.AppImage && ./LinuxFiles-nightly-x86_64.AppImage\`"
echo
echo "### Changes since the previous nightly"
# shellcheck disable=SC2086
git log --no-merges --format='- %h %s' $range
} > notes.md

gh release delete nightly -R "$REPO" --cleanup-tag --yes 2>/dev/null || true
gh release create nightly -R "$REPO" --target "$SHA" --prerelease \
--title "Nightly (linux/main @ $short)" --notes-file notes.md \
dist/LinuxFiles-nightly-linux-x64.tar.gz dist/LinuxFiles-nightly-x86_64.AppImage
8 changes: 8 additions & 0 deletions docs/linux-port/packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ files, which is how the package was build-tested with `makepkg` here (resulting
installed on the dev box, so the package is not linted. `aur/linuxfiles/PKGBUILD` (from source) is unchanged and
unbuilt.

## Nightly builds

`.github/workflows/nightly-linux.yml` builds the tarball and AppImage on every push to `linux/main` and replaces the
single rolling pre-release at https://github.com/MemerGamer/LinuxFiles/releases/tag/nightly (stable asset names
`LinuxFiles-nightly-linux-x64.tar.gz` and `LinuxFiles-nightly-x86_64.AppImage`; the Flatpak is only built for
`linux-v*` tags). Pull requests targeting `linux/main` get the same files as workflow artifacts with a read-only token.
Try it: `curl -LO https://github.com/MemerGamer/LinuxFiles/releases/download/nightly/LinuxFiles-nightly-x86_64.AppImage && chmod +x LinuxFiles-nightly-x86_64.AppImage && ./LinuxFiles-nightly-x86_64.AppImage`

## Becoming the default file manager (Phase 6, not done yet)

1. `inode/directory`: already in the desktop entry's `MimeType=`. Users (or the installer's post-install hook)
Expand Down
Loading