Skip to content

Commit

Permalink
chore(github): add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
defclass committed Feb 1, 2021
1 parent b7b02b2 commit 417d481
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build-desktop-release.yml
@@ -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

0 comments on commit 417d481

Please sign in to comment.