fix: GITHUB_TOKEN issue in electron build
This commit is contained in:
11
.github/workflows/electron.yml
vendored
11
.github/workflows/electron.yml
vendored
@@ -28,6 +28,8 @@ jobs:
|
|||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
if: github.event.inputs.build_type == 'all' || github.event.inputs.build_type == 'windows' || github.event.inputs.build_type == ''
|
if: github.event.inputs.build_type == 'all' || github.event.inputs.build_type == 'windows' || github.event.inputs.build_type == ''
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -66,6 +68,8 @@ jobs:
|
|||||||
echo "version=$VERSION" >> $env:GITHUB_OUTPUT
|
echo "version=$VERSION" >> $env:GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build Windows (All Architectures)
|
- name: Build Windows (All Architectures)
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: npm run build && npx electron-builder --win --x64 --ia32
|
run: npm run build && npx electron-builder --win --x64 --ia32
|
||||||
|
|
||||||
- name: List release files
|
- name: List release files
|
||||||
@@ -135,6 +139,8 @@ jobs:
|
|||||||
build-linux:
|
build-linux:
|
||||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||||
if: github.event.inputs.build_type == 'all' || github.event.inputs.build_type == 'linux' || github.event.inputs.build_type == ''
|
if: github.event.inputs.build_type == 'all' || github.event.inputs.build_type == 'linux' || github.event.inputs.build_type == ''
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -166,6 +172,8 @@ jobs:
|
|||||||
npm install --force @rollup/rollup-linux-arm-gnueabihf
|
npm install --force @rollup/rollup-linux-arm-gnueabihf
|
||||||
|
|
||||||
- name: Build Linux (All Architectures)
|
- name: Build Linux (All Architectures)
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: npm run build && npx electron-builder --linux --x64 --arm64 --armv7l
|
run: npm run build && npx electron-builder --linux --x64 --arm64 --armv7l
|
||||||
|
|
||||||
- name: Rename Linux artifacts for consistency
|
- name: Rename Linux artifacts for consistency
|
||||||
@@ -267,6 +275,8 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
if: github.event.inputs.build_type == 'macos' || github.event.inputs.build_type == 'all'
|
if: github.event.inputs.build_type == 'macos' || github.event.inputs.build_type == 'all'
|
||||||
needs: []
|
needs: []
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -341,6 +351,7 @@ jobs:
|
|||||||
if: steps.check_certs.outputs.has_certs == 'true'
|
if: steps.check_certs.outputs.has_certs == 'true'
|
||||||
env:
|
env:
|
||||||
ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES: true
|
ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES: true
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
||||||
BUILD_VERSION="${{ github.run_number }}"
|
BUILD_VERSION="${{ github.run_number }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user