mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-02-26 13:00:09 +08:00
ci: fix github action
This commit is contained in:
parent
9ef141fc66
commit
c632ab866b
59
.github/workflows/release.yml
vendored
59
.github/workflows/release.yml
vendored
@ -17,61 +17,36 @@ on:
|
|||||||
- ".github/**"
|
- ".github/**"
|
||||||
- "!.github/workflows/release.yml"
|
- "!.github/workflows/release.yml"
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: "bash"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
# see more environment https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
|
runs-on: ${{ matrix.os }}
|
||||||
runs-on: [ubuntu-20.04]
|
|
||||||
# https://www.electron.build/multi-platform-build#provided-docker-images
|
|
||||||
container: electronuserland/builder:wine
|
|
||||||
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ELECTRON_BUILDER_CACHE: "/root/.cache/electron-builder"
|
|
||||||
ELECTRON_CACHE: "/root/.cache/electron"
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node: ["14"]
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node }}
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: 14
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install Dependencies
|
||||||
run: npm i
|
run: npm install
|
||||||
|
|
||||||
# - name: Run tests
|
- name: Build Release Files
|
||||||
# run: npm run test
|
run: npm run build
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# - name: Build dependencies
|
- name: Upload Artifact
|
||||||
# run: npm run build
|
uses: actions/upload-artifact@v3
|
||||||
# env:
|
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
# - uses: actions/upload-artifact@v2
|
|
||||||
# with:
|
|
||||||
# name: upload-artifact
|
|
||||||
# path: |
|
|
||||||
# release/electron-vue-vite*.exe
|
|
||||||
# release/electron-vue-vite*.AppImage
|
|
||||||
# release/electron-vue-vite*.snap
|
|
||||||
|
|
||||||
# https://github.com/marketplace/actions/electron-builder-action
|
|
||||||
- name: Compile & Release Electron app
|
|
||||||
uses: samuelmeuli/action-electron-builder@v1
|
|
||||||
with:
|
with:
|
||||||
build_script_name: prebuild
|
name: release_on_${{ matrix. os }}
|
||||||
args: --config electron-builder.json5
|
path: release/
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
retention-days: 5
|
||||||
release: ${{ startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push' && needs.get_metadata.outputs.branch == 'main'}}
|
|
||||||
max_attempts: 3
|
|
Loading…
x
Reference in New Issue
Block a user