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
78 changes: 76 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,88 @@ jobs:
esac
ls -la out

# The .deb is an update payload too: a .deb install updates from the
# app (the updater runs pkexec dpkg -i on it), so it needs a signature.
- name: Sign the .deb
if: matrix.name == 'linux'
shell: bash
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: |
npx tauri signer sign out/stroke-nightly_amd64.deb
test -s out/stroke-nightly_amd64.deb.sig

- uses: actions/upload-artifact@v4
with:
name: nightly-${{ matrix.name }}
path: out/*
if-no-files-found: error
retention-days: 3

# ── 2b. The Arch package ────────────────────────────────────────────────────
# The same package the AUR builds (stroke-nightly-bin, from the .deb),
# built here so an Arch install can update from the app: it downloads
# this and runs `pkexec pacman -U` on it. Same name and version as the
# AUR's, so yay sees the result as up to date.
build-pacman:
needs: [check, build]
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: Tools
run: pacman -Syu --noconfirm --needed base-devel nodejs npm git sudo

- uses: actions/checkout@v5
with:
ref: ${{ needs.check.outputs.sha }}

- uses: actions/download-artifact@v4
with:
name: nightly-linux
path: linux

- name: Build the package
env:
VERSION: ${{ needs.check.outputs.version }}
COMMIT: ${{ needs.check.outputs.sha }}
run: |
set -euo pipefail
PKGVER="${VERSION//-/.}"
useradd -m builder
mkdir -p /tmp/pkg
# Named the way the PKGBUILD's source names it, so makepkg uses this
# file instead of downloading a release that isn't published yet.
cp linux/stroke-nightly_amd64.deb "/tmp/pkg/stroke-nightly-${PKGVER}.deb"
SHA=$(sha256sum "/tmp/pkg/stroke-nightly-${PKGVER}.deb" | cut -d' ' -f1)
sed -e "s/@PKGVER@/${PKGVER}/" -e "s/@SHA256@/${SHA}/" -e "s/@COMMIT@/${COMMIT}/" \
packaging/aur/stroke-nightly-bin/PKGBUILD.in > /tmp/pkg/PKGBUILD
chown -R builder /tmp/pkg
sudo -u builder bash -c 'cd /tmp/pkg && makepkg --nodeps --noconfirm'
mkdir -p out
cp /tmp/pkg/stroke-nightly-bin-*.pkg.tar.zst out/stroke-nightly_x86_64.pkg.tar.zst
ls -la out

- name: Sign
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: |
npx -y @tauri-apps/cli@2 signer sign out/stroke-nightly_x86_64.pkg.tar.zst
test -s out/stroke-nightly_x86_64.pkg.tar.zst.sig

- uses: actions/upload-artifact@v4
with:
name: nightly-pacman
path: out/*
if-no-files-found: error
retention-days: 3

# ── 3. Replace the `nightly` pre-release ───────────────────────────────────
# Only after every platform built: a failed night keeps the previous
# nightly up instead of publishing a partial one.
publish:
needs: [check, build]
needs: [check, build, build-pacman]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -252,6 +322,10 @@ jobs:
'darwin-aarch64': { url: BASE + '/stroke-nightly_aarch64.app.tar.gz', signature: sig('stroke-nightly_aarch64.app.tar.gz.sig') },
'darwin-x86_64': { url: BASE + '/stroke-nightly_x64.app.tar.gz', signature: sig('stroke-nightly_x64.app.tar.gz.sig') },
'linux-x86_64': { url: BASE + '/stroke-nightly_amd64.AppImage', signature: sig('stroke-nightly_amd64.AppImage.sig') },
// Linux packages update from the app too, each from its own entry:
// a .deb through pkexec dpkg, an Arch install through pkexec pacman.
'linux-x86_64-deb': { url: BASE + '/stroke-nightly_amd64.deb', signature: sig('stroke-nightly_amd64.deb.sig') },
'linux-x86_64-pacman': { url: BASE + '/stroke-nightly_x86_64.pkg.tar.zst', signature: sig('stroke-nightly_x86_64.pkg.tar.zst.sig') },
'windows-x86_64': { url: BASE + '/stroke-nightly_x64-setup.exe', signature: sig('stroke-nightly_x64-setup.exe.sig') },
}
// The changelog since the last stable release, in CHANGELOG.md's own
Expand Down Expand Up @@ -284,7 +358,7 @@ jobs:
echo "| macOS (Apple Silicon) | \`stroke-nightly_aarch64.dmg\` |"
echo "| macOS (Intel) | \`stroke-nightly_x64.dmg\` |"
echo "| Windows | \`stroke-nightly_x64-setup.exe\` |"
echo "| Linux | \`stroke-nightly_amd64.AppImage\` · \`stroke-nightly_amd64.deb\` |"
echo "| Linux | \`stroke-nightly_amd64.AppImage\` · \`stroke-nightly_amd64.deb\` · \`stroke-nightly_x86_64.pkg.tar.zst\` (Arch) |"
echo
echo "### Changes since the last nightly"
if [ -n "$PREV" ]; then
Expand Down
Loading
Loading