mirror of
https://github.com/logseq/logseq.git
synced 2026-04-27 15:45:00 +00:00
chore(github): add github action
This commit is contained in:
56
.github/workflows/build-desktop-release.yml
vendored
Normal file
56
.github/workflows/build-desktop-release.yml
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Build-Desktop-Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ macos-latest]
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Node.js, NPM and Yarn
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
|
||||
- name: Install brew & clojure
|
||||
run: |
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
brew install clojure/tools/clojure
|
||||
|
||||
- name: Build/release Electron app
|
||||
run: yarn install && yarn release-electron
|
||||
|
||||
- name: clean build
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: |
|
||||
find ./static -name "*.zip" -type f -exec cp {} ./static \;
|
||||
npx rimraf "static/!(*.zip)"
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
draft: true
|
||||
prerelease: true
|
||||
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./static/**
|
||||
asset_name: Logseq.zip
|
||||
Reference in New Issue
Block a user