-
Notifications
You must be signed in to change notification settings - Fork 2
chore: sync alpha branch updates to dev #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0685205
f820601
82923ad
3eb0d79
71b4efc
657927c
cc718db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,236 @@ | ||||||||||||
| name: Dev Release Build | ||||||||||||
|
|
||||||||||||
| on: | ||||||||||||
| workflow_dispatch: | ||||||||||||
| inputs: | ||||||||||||
| platform: | ||||||||||||
| description: 'Target platform' | ||||||||||||
| required: true | ||||||||||||
| type: choice | ||||||||||||
| options: | ||||||||||||
| - macos | ||||||||||||
| - linux | ||||||||||||
| - windows | ||||||||||||
| version: | ||||||||||||
| description: 'Version to set (optional)' | ||||||||||||
| required: false | ||||||||||||
| type: string | ||||||||||||
|
|
||||||||||||
| jobs: | ||||||||||||
| build-macos: | ||||||||||||
| runs-on: macos-latest | ||||||||||||
| if: ${{ inputs.platform == 'macos' }} | ||||||||||||
|
|
||||||||||||
|
Comment on lines
+21
to
+23
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Set a job timeout to prevent hung builds. build-macos:
runs-on: macos-latest
+ timeout-minutes: 60
if: ${{ inputs.platform == 'macos' }}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| steps: | ||||||||||||
| - name: Checkout repository | ||||||||||||
| uses: actions/checkout@v4 | ||||||||||||
|
|
||||||||||||
| - name: Setup Node.js | ||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||
| with: | ||||||||||||
| node-version: '20' | ||||||||||||
|
|
||||||||||||
| - name: Setup pnpm | ||||||||||||
| uses: pnpm/action-setup@v3 | ||||||||||||
| with: | ||||||||||||
| version: 8 | ||||||||||||
| run_install: false | ||||||||||||
|
|
||||||||||||
| - name: Get pnpm store directory | ||||||||||||
| shell: bash | ||||||||||||
| run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||||||||||||
|
|
||||||||||||
| - name: Setup pnpm cache | ||||||||||||
| uses: actions/cache@v3 | ||||||||||||
| with: | ||||||||||||
|
Comment on lines
+44
to
+45
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Upgrade actions/cache to v4 to avoid runner warnings. actionlint flags v3 as too old on current runners. Apply across all jobs: - - name: Setup pnpm cache
- uses: actions/cache@v3
+ - name: Setup pnpm cache
+ uses: actions/cache@v4Also applies to: 117-118, 190-191 🧰 Tools🪛 actionlint (1.7.7)44-44: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 🤖 Prompt for AI Agents |
||||||||||||
| path: ${{ env.STORE_PATH }} | ||||||||||||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||||||||||||
| restore-keys: | | ||||||||||||
| ${{ runner.os }}-pnpm-store- | ||||||||||||
|
|
||||||||||||
| - name: Install dependencies | ||||||||||||
| run: pnpm install | ||||||||||||
|
|
||||||||||||
| - name: Set version | ||||||||||||
| if: ${{ inputs.version != '' }} | ||||||||||||
| shell: bash | ||||||||||||
| run: | | ||||||||||||
| node -e " | ||||||||||||
| const fs = require('fs'); | ||||||||||||
| const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); | ||||||||||||
| pkg.version = '${{ inputs.version }}'; | ||||||||||||
| fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); | ||||||||||||
| console.log(\`Version set to \${pkg.version}\`); | ||||||||||||
| " | ||||||||||||
|
|
||||||||||||
| - name: Build macOS package | ||||||||||||
| run: | | ||||||||||||
| pnpm build | ||||||||||||
| pnpm exec electron-builder --mac --publish never | ||||||||||||
| env: | ||||||||||||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||
| ELECTRON_BUILDER_CHANNEL: dev | ||||||||||||
|
|
||||||||||||
|
Comment on lines
+71
to
+73
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Prevent accidental macOS code signing lookups in dev builds. Avoids delays/failures if a signing identity is present on hosted runners. env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- ELECTRON_BUILDER_CHANNEL: dev
+ ELECTRON_BUILDER_CHANNEL: dev
+ CSC_IDENTITY_AUTO_DISCOVERY: false📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| - name: List build artifacts | ||||||||||||
| shell: bash | ||||||||||||
| run: | | ||||||||||||
| echo "Build artifacts:" | ||||||||||||
| find dist -type f -name "*" | head -20 | ||||||||||||
|
|
||||||||||||
| - name: Upload artifacts | ||||||||||||
| uses: actions/upload-artifact@v4 | ||||||||||||
| with: | ||||||||||||
| name: macos-dev-artifacts | ||||||||||||
| path: | | ||||||||||||
| dist/*.dmg | ||||||||||||
| dist/*.zip | ||||||||||||
| dist/*.yml | ||||||||||||
| dist/*.yaml | ||||||||||||
| dist/*.blockmap | ||||||||||||
| retention-days: 30 | ||||||||||||
|
Comment on lines
+66
to
+90
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Optional: reduce duplication with a strategy matrix. You can parameterize platform, build flags, and artifact globs to one job. This will simplify maintenance as patterns evolve. I can provide a matrix-based rewrite if you'd like to adopt it. Also applies to: 139-165, 212-236 |
||||||||||||
| if-no-files-found: warn | ||||||||||||
|
|
||||||||||||
| build-linux: | ||||||||||||
| runs-on: ubuntu-latest | ||||||||||||
| if: ${{ inputs.platform == 'linux' }} | ||||||||||||
|
|
||||||||||||
|
Comment on lines
+94
to
+96
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Mirror the timeout on Linux. build-linux:
runs-on: ubuntu-latest
+ timeout-minutes: 60
if: ${{ inputs.platform == 'linux' }}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| steps: | ||||||||||||
| - name: Checkout repository | ||||||||||||
| uses: actions/checkout@v4 | ||||||||||||
|
|
||||||||||||
| - name: Setup Node.js | ||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||
| with: | ||||||||||||
| node-version: '20' | ||||||||||||
|
|
||||||||||||
| - name: Setup pnpm | ||||||||||||
| uses: pnpm/action-setup@v3 | ||||||||||||
| with: | ||||||||||||
| version: 8 | ||||||||||||
| run_install: false | ||||||||||||
|
|
||||||||||||
| - name: Get pnpm store directory | ||||||||||||
| shell: bash | ||||||||||||
| run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||||||||||||
|
|
||||||||||||
| - name: Setup pnpm cache | ||||||||||||
| uses: actions/cache@v3 | ||||||||||||
| with: | ||||||||||||
| path: ${{ env.STORE_PATH }} | ||||||||||||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||||||||||||
| restore-keys: | | ||||||||||||
| ${{ runner.os }}-pnpm-store- | ||||||||||||
|
|
||||||||||||
| - name: Install dependencies | ||||||||||||
| run: pnpm install | ||||||||||||
|
|
||||||||||||
| - name: Set version | ||||||||||||
| if: ${{ inputs.version != '' }} | ||||||||||||
| shell: bash | ||||||||||||
| run: | | ||||||||||||
| node -e " | ||||||||||||
| const fs = require('fs'); | ||||||||||||
| const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); | ||||||||||||
| pkg.version = '${{ inputs.version }}'; | ||||||||||||
| fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); | ||||||||||||
| console.log(\`Version set to \${pkg.version}\`); | ||||||||||||
| " | ||||||||||||
|
|
||||||||||||
| - name: Build Linux package | ||||||||||||
| run: | | ||||||||||||
| pnpm build | ||||||||||||
| pnpm exec electron-builder --linux --publish never | ||||||||||||
| env: | ||||||||||||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||
| ELECTRON_BUILDER_CHANNEL: dev | ||||||||||||
|
|
||||||||||||
|
Comment on lines
+144
to
+146
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Apply the same no-sign setting for Linux (harmless, keeps parity). env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- ELECTRON_BUILDER_CHANNEL: dev
+ ELECTRON_BUILDER_CHANNEL: dev
+ CSC_IDENTITY_AUTO_DISCOVERY: false🤖 Prompt for AI Agents |
||||||||||||
| - name: List build artifacts | ||||||||||||
| shell: bash | ||||||||||||
| run: | | ||||||||||||
| echo "Build artifacts:" | ||||||||||||
| find dist -type f -name "*" | head -20 | ||||||||||||
|
|
||||||||||||
| - name: Upload artifacts | ||||||||||||
| uses: actions/upload-artifact@v4 | ||||||||||||
| with: | ||||||||||||
| name: linux-dev-artifacts | ||||||||||||
| path: | | ||||||||||||
| dist/*.AppImage | ||||||||||||
| dist/*.deb | ||||||||||||
| dist/*.yml | ||||||||||||
| dist/*.yaml | ||||||||||||
| dist/*.blockmap | ||||||||||||
| retention-days: 30 | ||||||||||||
| if-no-files-found: warn | ||||||||||||
|
|
||||||||||||
| build-windows: | ||||||||||||
| runs-on: windows-latest | ||||||||||||
| if: ${{ inputs.platform == 'windows' }} | ||||||||||||
|
|
||||||||||||
|
Comment on lines
+167
to
+169
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Mirror the timeout on Windows. build-windows:
runs-on: windows-latest
+ timeout-minutes: 60
if: ${{ inputs.platform == 'windows' }}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| steps: | ||||||||||||
| - name: Checkout repository | ||||||||||||
| uses: actions/checkout@v4 | ||||||||||||
|
|
||||||||||||
| - name: Setup Node.js | ||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||
| with: | ||||||||||||
| node-version: '20' | ||||||||||||
|
|
||||||||||||
| - name: Setup pnpm | ||||||||||||
| uses: pnpm/action-setup@v3 | ||||||||||||
| with: | ||||||||||||
| version: 8 | ||||||||||||
| run_install: false | ||||||||||||
|
|
||||||||||||
| - name: Get pnpm store directory | ||||||||||||
| shell: bash | ||||||||||||
| run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||||||||||||
|
|
||||||||||||
| - name: Setup pnpm cache | ||||||||||||
| uses: actions/cache@v3 | ||||||||||||
| with: | ||||||||||||
| path: ${{ env.STORE_PATH }} | ||||||||||||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||||||||||||
| restore-keys: | | ||||||||||||
| ${{ runner.os }}-pnpm-store- | ||||||||||||
|
|
||||||||||||
| - name: Install dependencies | ||||||||||||
| run: pnpm install | ||||||||||||
|
|
||||||||||||
| - name: Set version | ||||||||||||
| if: ${{ inputs.version != '' }} | ||||||||||||
| shell: bash | ||||||||||||
| run: | | ||||||||||||
| node -e " | ||||||||||||
| const fs = require('fs'); | ||||||||||||
| const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); | ||||||||||||
| pkg.version = '${{ inputs.version }}'; | ||||||||||||
| fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); | ||||||||||||
| console.log(\`Version set to \${pkg.version}\`); | ||||||||||||
| " | ||||||||||||
|
|
||||||||||||
| - name: Build Windows package | ||||||||||||
| run: | | ||||||||||||
| pnpm build | ||||||||||||
| pnpm exec electron-builder --win --publish never | ||||||||||||
| env: | ||||||||||||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||
| ELECTRON_BUILDER_CHANNEL: dev | ||||||||||||
|
|
||||||||||||
| - name: List build artifacts | ||||||||||||
| shell: bash | ||||||||||||
| run: | | ||||||||||||
| echo "Build artifacts:" | ||||||||||||
| find dist -type f -name "*" | head -20 | ||||||||||||
|
|
||||||||||||
| - name: Upload artifacts | ||||||||||||
| uses: actions/upload-artifact@v4 | ||||||||||||
| with: | ||||||||||||
| name: windows-dev-artifacts | ||||||||||||
| path: | | ||||||||||||
| dist/*.exe | ||||||||||||
| dist/*.yml | ||||||||||||
| dist/*.yaml | ||||||||||||
| dist/*.blockmap | ||||||||||||
| retention-days: 30 | ||||||||||||
| if-no-files-found: warn | ||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add minimal permissions and concurrency to reduce risk and duplicate builds.
Tighten token scope and auto-cancel overlapping runs per platform.
on: workflow_dispatch: inputs: platform: description: 'Target platform' required: true type: choice options: - macos - linux - windows version: description: 'Version to set (optional)' required: false type: string + +permissions: + contents: read + +concurrency: + group: dev-release-${{ github.workflow }}-${{ inputs.platform || 'all' }} + cancel-in-progress: true📝 Committable suggestion
🤖 Prompt for AI Agents