mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-01-19 03:46:35 +08:00
commit
858ea14cfa
59
.github/workflows/release.yml
vendored
59
.github/workflows/release.yml
vendored
@ -17,61 +17,36 @@ on:
|
||||
- ".github/**"
|
||||
- "!.github/workflows/release.yml"
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: "bash"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# see more environment https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
|
||||
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"
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node: ["14"]
|
||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
node-version: 14
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm i
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
||||
# - name: Run tests
|
||||
# run: npm run test
|
||||
- name: Build Release Files
|
||||
run: npm run build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# - name: Build dependencies
|
||||
# run: npm run build
|
||||
# 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
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
build_script_name: prebuild
|
||||
args: --config electron-builder.json5
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
release: ${{ startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push' && needs.get_metadata.outputs.branch == 'main'}}
|
||||
max_attempts: 3
|
||||
name: release_on_${{ matrix. os }}
|
||||
path: release/
|
||||
retention-days: 5
|
Loading…
x
Reference in New Issue
Block a user