- Add release.yml: builds and deploys to dist branch on push to main - Add GitHub Releases creation on version tags - Update vite.config.ts: updateURL/downloadURL point to dist branch - Update README: one-click install links for PC and Android - Add auto-update documentation (EN/RU) - Add manual install from Releases instructions - Revert dist/ from gitignore (built by CI, not committed)
54 lines
1.1 KiB
YAML
54 lines
1.1 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ["v*"]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "npm"
|
|
|
|
- run: npm ci
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
- name: Typecheck
|
|
run: npm run typecheck
|
|
|
|
- name: Knip
|
|
run: npm run knip
|
|
|
|
- name: Test
|
|
run: npm run test
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Deploy to dist branch
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./dist
|
|
publish_branch: dist
|
|
keep_files: false
|
|
|
|
- name: Create GitHub Release on tag
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
dist/opencode-voice-dictation.user.js
|
|
dist/opencode-voice-dictation.meta.js
|
|
generate_release_notes: true
|