Skip to content

Add build and release GitHub Actions pipelines - #1

Merged
HONGJICAI merged 9 commits into
masterfrom
copilot/add-build-and-release-pipelines
Jan 12, 2026
Merged

Add build and release GitHub Actions pipelines#1
HONGJICAI merged 9 commits into
masterfrom
copilot/add-build-and-release-pipelines

Conversation

Copilot AI commented Jan 12, 2026

Copy link
Copy Markdown
Contributor
  • Create .github/workflows/build.yml - Build pipeline that:
    • Installs Node.js dependencies
    • Downloads frpc binaries from fatedier/frp releases
    • Builds the frontend with npm
    • Builds Android APK using Gradle
  • Create .github/workflows/release.yml - Release pipeline that:
    • Triggers on tag push or release creation
    • Runs the full build
    • Uploads APK artifacts to the GitHub release
  • Validate workflow syntax with YAML parser
  • Run code review
  • Run CodeQL security scan - Fixed missing permissions block
  • Fix actions/download-artifact vulnerability - upgraded to v4.1.8
  • Change workflow to track master branch instead of main
  • Fix build error - removed unused carbon-preprocess-svelte import from svelte.config.js
  • Fix build error - changed fallback from app.html to index.html and removed unnecessary copy plugin from vite.config.ts
  • Fix gradlew permission denied error by adding chmod +x before running gradlew
  • Upgrade JDK from 17 to 21 to match Capacitor requirements
Original prompt

I need to add build pipeline and release pipeline for the project. Read the readme and download the necessary dependency when build


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 12, 2026 06:32
Co-authored-by: HONGJICAI <14875213+HONGJICAI@users.noreply.github.com>
Co-authored-by: HONGJICAI <14875213+HONGJICAI@users.noreply.github.com>
Co-authored-by: HONGJICAI <14875213+HONGJICAI@users.noreply.github.com>
Copilot AI changed the title [WIP] Add build and release pipelines for the project Add build and release GitHub Actions pipelines Jan 12, 2026
Copilot AI requested a review from HONGJICAI January 12, 2026 06:36
@HONGJICAI

Copy link
Copy Markdown
Owner

@copilot You need to track branch master

Co-authored-by: HONGJICAI <14875213+HONGJICAI@users.noreply.github.com>

Copilot AI commented Jan 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot You need to track branch master

Updated the build workflow to track master branch instead of main in commit e0c8e3b.

@HONGJICAI

Copy link
Copy Markdown
Owner

@copilot There are build errors. Logs on: https://github.com/HONGJICAI/Frpc-capacitor/actions/runs/20910835104/job/60075529087?pr=1. Can you fix it?

Co-authored-by: HONGJICAI <14875213+HONGJICAI@users.noreply.github.com>

Copilot AI commented Jan 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot There are build errors. Logs on: https://github.com/HONGJICAI/Frpc-capacitor/actions/runs/20910835104/job/60075529087?pr=1. Can you fix it?

Fixed in commit d990787. The build was failing because svelte.config.js imported carbon-preprocess-svelte which wasn't listed in package.json. Since the import (optimizeImports) was never used, I removed it.

@HONGJICAI

Copy link
Copy Markdown
Owner

@copilot Error: ENOENT: no such file or directory, copyfile 'build/app.html' -> 'build/index.html'

Co-authored-by: HONGJICAI <14875213+HONGJICAI@users.noreply.github.com>

Copilot AI commented Jan 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Error: ENOENT: no such file or directory, copyfile 'build/app.html' -> 'build/index.html'

Fixed in commit 888794e. The build error occurred because the custom Vite plugin tried to copy build/app.html before the SvelteKit adapter had generated it. I changed the adapter's fallback option from 'app.html' to 'index.html' (which is what Capacitor expects) and removed the unnecessary copy plugin from vite.config.ts.

@HONGJICAI

Copy link
Copy Markdown
Owner

@copilot Run ./gradlew assembleRelease
/home/runner/work/_temp/b8234bd1-8a09-4383-811e-f2f456351105.sh: line 1: ./gradlew: Permission denied
Error: Process completed with exit code 126.

Co-authored-by: HONGJICAI <14875213+HONGJICAI@users.noreply.github.com>

Copilot AI commented Jan 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Run ./gradlew assembleRelease
/home/runner/work/_temp/b8234bd1-8a09-4383-811e-f2f456351105.sh: line 1: ./gradlew: Permission denied
Error: Process completed with exit code 126.

Fixed in commit 54d2e10. Added chmod +x ./gradlew before running the assembleRelease command to grant execute permission to the gradlew script.

@HONGJICAI

Copy link
Copy Markdown
Owner

@copilot 36 actionable tasks: 36 executed

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':capacitor-android:compileReleaseJavaWithJavac'.

error: invalid source release: 21

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

Co-authored-by: HONGJICAI <14875213+HONGJICAI@users.noreply.github.com>

Copilot AI commented Jan 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot 36 actionable tasks: 36 executed

FAILURE: Build failed with an exception....

Fixed in commit 181b788. The Capacitor Android project requires Java 21 (as specified in capacitor.build.gradle), so I upgraded the JDK version in the workflow from 17 to 21.

@HONGJICAI
HONGJICAI marked this pull request as ready for review January 12, 2026 16:05
@HONGJICAI
HONGJICAI merged commit 91ffc8a into master Jan 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants