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
62 changes: 62 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build Plugin

on:
push:
branches: [ main, gh-workflow ]
pull_request:
branches: [ main, gh-workflow ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest

- name: Create CLI directory
run: mkdir -p cli

- name: Download Decky CLI
run: |
curl -L -o cli/decky "https://github.com/SteamDeckHomebrew/cli/releases/latest/download/decky-linux-x86_64"
chmod +x cli/decky

- name: Verify Decky CLI
run: ./cli/decky --version

- name: Clean node_modules (if exists)
run: rm -rf node_modules

- name: Install dependencies
run: pnpm install

- name: Build backend (if needed)
run: |
if [ -f "backend/Makefile" ]; then
cd backend && make
fi

- name: Build plugin
run: ./cli/decky plugin build .

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: lossless-scaling
path: out/*.zip
retention-days: 30

- name: List output files
run: ls -la out/
64 changes: 64 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Release Plugin

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest

- name: Create CLI directory
run: mkdir -p cli

- name: Download Decky CLI
run: |
curl -L -o cli/decky "https://github.com/SteamDeckHomebrew/cli/releases/latest/download/decky-linux-x86_64"
chmod +x cli/decky

- name: Clean node_modules (if exists)
run: rm -rf node_modules

- name: Install dependencies
run: pnpm install

- name: Build backend (if needed)
run: |
if [ -f "backend/Makefile" ]; then
cd backend && make
fi

- name: Build plugin
run: ./cli/decky plugin build .

- name: Get plugin name for artifact
id: plugin_name
run: |
PLUGIN_NAME=$(jq -r '.name' plugin.json)
echo "name=$PLUGIN_NAME" >> $GITHUB_OUTPUT
echo "Plugin name: $PLUGIN_NAME"

- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: out/*.zip
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}