chore(github): add github action

This commit is contained in:
defclass
2021-01-29 16:43:57 +08:00
parent b7b02b22da
commit 417d481763

View 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