-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
89 lines (72 loc) · 2.3 KB
/
build-desktop-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# This is a basic workflow to help you get started with Actions
name: Build-Desktop-Release
on:
workflow_dispatch:
inputs:
tag-name:
description: "Release Tag Name"
required: true
git-ref:
description: "Release Git Ref"
required: true
jobs:
build-linux:
runs-on: ubuntu-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
build-macos:
runs-on: 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: Cache Artifact
uses: actions/upload-artifact@v1
with:
name: Logseq-x64.dmg
path: static/out/make/Logseq.dmg
release:
needs: [ build-macos, build-linux, build-windows ]
runs-on: ubuntu-latest
steps:
- name: Download the Linux Asset
uses: actions/download-artifact@v1
with:
name: Logseq-x64.dmg
path: .
- name: List file
run: ls -rl
- name: Create Release Draft
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.tag-name }}
release_name: TEST CI (DON'T DOWNLOAD) ${{ github.event.inputs.tag-name }}
draft: true
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Logseq-x64.dmg
asset_name: logseq-darwin-x64-${{ github.event.inputs.tag-name }}.dmg
asset_content_type: application/x-apple-diskimage