mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-03 17:41:58 +02:00
Kernels >= 7.2 keep the firmware's S4/S5 wake bit on GPIO pin 18, so the Steam Machine starts again right after powering off. Steam Machine support now builds a DKMS module (patches/steamify-fremont-poweroff.c) that clears it before power-off, for every kernel. The kernel pin is no longer ticked by default. Module sources and patches move to patches/, embedded by the single-file build.
129 lines
6.2 KiB
YAML
129 lines
6.2 KiB
YAML
# Builds the single-file wizard (.github/tools/bundle.sh) and publishes it as a
|
|
# release per version: tag v$VERSION (VERSION in steamify.sh),
|
|
# with that version's CHANGELOG.md section as notes. A released version is
|
|
# never overwritten; the newest one is marked latest, and the "latest" tag and
|
|
# release are moved to it, so both of these always get the newest version:
|
|
# curl -fsSL https://github.com/theupriser/steamify-cachyos/releases/latest/download/steamify.sh | bash
|
|
# curl -fsSL https://github.com/theupriser/steamify-cachyos/releases/download/latest/steamify.sh | bash
|
|
# Each release also has the app (v2): steamify-app.tar.gz (ui/, steamify.sh,
|
|
# lib/, patches/, the icon) and its launcher, run with:
|
|
# curl -fsSL https://github.com/theupriser/steamify-cachyos/releases/latest/download/steamify-app.sh | bash
|
|
# A push to feat/v2-ui (the app, not released yet) updates the pre-release
|
|
# v2-ui-preview instead, whose launcher gets that build:
|
|
# curl -fsSL https://github.com/theupriser/steamify-cachyos/releases/download/v2-ui-preview/steamify-app.sh | bash
|
|
# Pull requests only build and check it, and warn when VERSION is already released.
|
|
name: Single-file build
|
|
|
|
on:
|
|
push:
|
|
branches: [main, feat/v2-ui]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
bundle:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # for the version in the bundle's header
|
|
|
|
- name: Build
|
|
run: |
|
|
.github/tools/bundle.sh dist/steamify.sh
|
|
# The app: sources, not the single-file build (its backend mode runs
|
|
# steamify.sh from its own folder).
|
|
tar -czf dist/steamify-app.tar.gz steamify.sh lib patches ui assets/steam-gaming-settings.svg LICENSE.md
|
|
cp ui/steamify-app.sh dist/steamify-app.sh
|
|
|
|
- name: Check
|
|
run: |
|
|
bash -n dist/steamify.sh
|
|
# SC2034/SC2154: variables used across the inlined modules.
|
|
shellcheck -S warning -e SC2034,SC2154 dist/steamify.sh
|
|
shellcheck -S warning dist/steamify-app.sh
|
|
python3 -m py_compile ui/steamify-ui
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: steamify
|
|
path: |
|
|
dist/steamify.sh
|
|
dist/steamify-app.tar.gz
|
|
dist/steamify-app.sh
|
|
|
|
- name: Version
|
|
id: version
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
version="$(grep -oP '^VERSION=\K.*' steamify.sh)"
|
|
echo "version=$version" >> "$GITHUB_OUTPUT"
|
|
if gh release view "v$version" >/dev/null 2>&1; then
|
|
echo "released=true" >> "$GITHUB_OUTPUT"
|
|
echo "::warning::v$version is already released and won't be overwritten. Bump VERSION in steamify.sh and add a CHANGELOG.md section to release this."
|
|
else
|
|
echo "released=false" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Publish the v${{ steps.version.outputs.version }} release
|
|
if: >-
|
|
github.event_name != 'pull_request' && github.ref == 'refs/heads/main' &&
|
|
steps.version.outputs.released == 'false'
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
VERSION: ${{ steps.version.outputs.version }}
|
|
run: |
|
|
# This version's section of CHANGELOG.md, without its heading.
|
|
changes="$(awk -v v="$VERSION" '
|
|
$0 ~ "^## " { if (found) exit; if (index($0, "## " v " ") == 1) { found = 1; next } }
|
|
found' CHANGELOG.md)"
|
|
notes="Single-file build of v$VERSION ($(git describe --always), $(git log -1 --format=%cs)).
|
|
Run the newest version with:
|
|
|
|
curl -fsSL https://github.com/${{ github.repository }}/releases/latest/download/steamify.sh | bash
|
|
|
|
Or the app (v2):
|
|
|
|
curl -fsSL https://github.com/${{ github.repository }}/releases/latest/download/steamify-app.sh | bash
|
|
|
|
## Changes in v$VERSION
|
|
$changes"
|
|
gh release create "v$VERSION" dist/steamify.sh dist/steamify-app.sh dist/steamify-app.tar.gz assets/steam-gaming-settings.svg \
|
|
--target "$GITHUB_SHA" --title "Steamify CachyOS v$VERSION" --notes "$notes" --latest
|
|
|
|
# "latest" follows the newest version tag, for the older install URL
|
|
# (.../releases/download/latest/...). Only moved when a new version
|
|
# is released, never for a push without a VERSION bump.
|
|
git tag -f latest "$GITHUB_SHA" && git push -f origin latest
|
|
latest_notes="Always the newest version, currently v$VERSION (see its release for the changes)."
|
|
if gh release view latest >/dev/null 2>&1; then
|
|
gh release edit latest --title "Steamify CachyOS - latest (v$VERSION)" --notes "$latest_notes" --latest=false
|
|
else
|
|
gh release create latest --title "Steamify CachyOS - latest (v$VERSION)" --notes "$latest_notes" --latest=false
|
|
fi
|
|
gh release upload latest dist/steamify.sh dist/steamify-app.sh dist/steamify-app.tar.gz assets/steam-gaming-settings.svg --clobber
|
|
|
|
- name: Publish the v2-ui-preview pre-release
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/feat/v2-ui'
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
# Its launcher downloads this pre-release, not the newest release.
|
|
sed -i 's/STEAMIFY_RELEASE:-latest/STEAMIFY_RELEASE:-v2-ui-preview/' dist/steamify-app.sh
|
|
grep -q 'STEAMIFY_RELEASE:-v2-ui-preview' dist/steamify-app.sh
|
|
git tag -f v2-ui-preview "$GITHUB_SHA" && git push -f origin v2-ui-preview
|
|
notes="Preview of the Steamify app (v2) from feat/v2-ui ($(git describe --always), $(git log -1 --format='%cs %s')). Not a release.
|
|
Run it with:
|
|
|
|
curl -fsSL https://github.com/${{ github.repository }}/releases/download/v2-ui-preview/steamify-app.sh | bash"
|
|
if gh release view v2-ui-preview >/dev/null 2>&1; then
|
|
gh release edit v2-ui-preview --title "Steamify app (v2) preview" --notes "$notes" --prerelease --latest=false
|
|
else
|
|
gh release create v2-ui-preview --target "$GITHUB_SHA" --title "Steamify app (v2) preview" --notes "$notes" --prerelease --latest=false
|
|
fi
|
|
gh release upload v2-ui-preview dist/steamify-app.sh dist/steamify-app.tar.gz --clobber
|