-
Notifications
You must be signed in to change notification settings - Fork 95
133 lines (117 loc) · 6.44 KB
/
build.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Build & Publish
on:
push:
tags:
- "v*"
jobs:
build-artifacts:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Build
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.15.1'
- run: yarn --frozen-lockfile --network-timeout 600000
- run: yarn lint
- name: 'Build Unix'
if: matrix.platform != 'windows-latest'
env:
LINDO_KEY: ${{ secrets.LINDO_KEY }}
run: LINDO_KEY=$LINDO_KEY yarn build
- name: 'Build Windows'
if: matrix.platform == 'windows-latest'
env:
LINDO_KEY: ${{ secrets.LINDO_KEY }}
run: $env:NODE_ENV=$LINDO_KEY; yarn build
- name: Extract version
id: extract_version
uses: Saionaro/[email protected]
- name: Upload Windows artifacts
uses: actions/upload-artifact@v2
if: matrix.platform == 'windows-latest'
with:
name: windows
path: |
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}-win.zip
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}-ia32-win.zip
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}.exe
release/${{ steps.extract_version.outputs.version }}/Lindo-Setup-${{ steps.extract_version.outputs.version }}.exe
release/${{ steps.extract_version.outputs.version }}/Lindo-Setup-${{ steps.extract_version.outputs.version }}.exe.blockmap
release/${{ steps.extract_version.outputs.version }}/latest.yml
- name: Upload MacOS artifacts
uses: actions/upload-artifact@v2
if: matrix.platform == 'macos-latest'
with:
name: macos
path: |
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}.dmg
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}.dmg.blockmap
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}-arm64.dmg
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}-arm64.dmg.blockmap
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}-mac.zip
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}-mac.zip.blockmap
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}-arm64-mac.zip
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}-arm64-mac.zip.blockmap
release/${{ steps.extract_version.outputs.version }}/latest-mac.yml
- name: Upload Linux artifacts
uses: actions/upload-artifact@v2
if: matrix.platform == 'ubuntu-latest'
with:
name: linux
path: |
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}.AppImage
release/${{ steps.extract_version.outputs.version }}/Lindo-${{ steps.extract_version.outputs.version }}-arm64.AppImage
release/${{ steps.extract_version.outputs.version }}/lindo-${{ steps.extract_version.outputs.version }}.tar.gz
release/${{ steps.extract_version.outputs.version }}/lindo-${{ steps.extract_version.outputs.version }}-arm64.tar.gz
release/${{ steps.extract_version.outputs.version }}/lindo_${{ steps.extract_version.outputs.version }}_amd64.deb
release/${{ steps.extract_version.outputs.version }}/lindo_${{ steps.extract_version.outputs.version }}_arm64.deb
release/${{ steps.extract_version.outputs.version }}/latest-linux.yml
create-release:
name: "Upload Release"
runs-on: ubuntu-latest
needs: [build-artifacts]
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- name: Display structure of downloaded files
run: ls -R
- name: Extract version
id: extract_version
uses: Saionaro/[email protected]
- name: Automatic Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
draft: true
automatic_release_tag: "v${{ steps.extract_version.outputs.version }}"
title: "v${{ steps.extract_version.outputs.version }}"
files: |
windows/Lindo-${{ steps.extract_version.outputs.version }}.exe
windows/Lindo-Setup-${{ steps.extract_version.outputs.version }}.exe
windows/Lindo-Setup-${{ steps.extract_version.outputs.version }}.exe.blockmap
windows/Lindo-${{ steps.extract_version.outputs.version }}-win.zip
windows/Lindo-${{ steps.extract_version.outputs.version }}-ia32-win.zip
windows/latest.yml
linux/Lindo-${{ steps.extract_version.outputs.version }}.AppImage
linux/Lindo-${{ steps.extract_version.outputs.version }}-arm64.AppImage
linux/lindo-${{ steps.extract_version.outputs.version }}.tar.gz
linux/lindo-${{ steps.extract_version.outputs.version }}-arm64.tar.gz
linux/lindo_${{ steps.extract_version.outputs.version }}_amd64.deb
linux/lindo_${{ steps.extract_version.outputs.version }}_arm64.deb
linux/latest-linux.yml
macos/Lindo-${{ steps.extract_version.outputs.version }}.dmg
macos/Lindo-${{ steps.extract_version.outputs.version }}.dmg.blockmap
macos/Lindo-${{ steps.extract_version.outputs.version }}-arm64.dmg
macos/Lindo-${{ steps.extract_version.outputs.version }}-arm64.dmg.blockmap
macos/Lindo-${{ steps.extract_version.outputs.version }}-mac.zip
macos/Lindo-${{ steps.extract_version.outputs.version }}-mac.zip.blockmap
macos/Lindo-${{ steps.extract_version.outputs.version }}-arm64-mac.zip
macos/Lindo-${{ steps.extract_version.outputs.version }}-arm64-mac.zip.blockmap
macos/latest-mac.yml