summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>2025-07-14 15:59:55 -0400
committerGitHub <noreply@github.com>2025-07-14 15:59:55 -0400
commit92cce332191f9150cbd85d01423ee20a680d8246 (patch)
treeaf8f9fc7b5d2eaf77ce5551ee6207b5d61784e2c
parent38aeda7445f48c98ca938105e3c772963dc8fb62 (diff)
parent6f96925a780ba533983dc4363cb36b75bca9f24f (diff)
downloaddecky-lsfg-vk-92cce332191f9150cbd85d01423ee20a680d8246.tar.gz
decky-lsfg-vk-92cce332191f9150cbd85d01423ee20a680d8246.zip
Merge pull request #13 from xXJSONDeruloXx/gh-workflow
initial build workflow
-rw-r--r--.github/workflows/build.yml62
-rw-r--r--.github/workflows/release.yml64
2 files changed, 126 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..8521aae
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -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/
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..40948b5
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -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 }}