-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (56 loc) · 1.78 KB
/
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
name: "Release"
on:
push:
tags: 'v*'
jobs:
build-job:
runs-on: ${{ matrix.os }}
name: "Release (${{ matrix.os }})"
strategy:
matrix:
os: [ubuntu-latest, windows-2019, macos-11]
steps:
- name: "Setup node"
uses: actions/setup-node@v1
with:
node-version: '16'
- name: "Checkout source code"
uses: "actions/checkout@v2"
- name: "Install modules"
run: "npm run install:ci"
- name: "Test"
run: "npm run jest:ci"
- name: "Generate build information json"
run: "node generateInfo.js"
- name: "Build release, create GitHub release and upload assets (electron-builder)"
run: "npm run release"
env:
GH_TOKEN: ${{ github.token }}
# create release if it doesn't exist
CI_BUILD_TAG: 1
- name: Gets latest created release info
id: latest_release_info
uses: jossef/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Create installer
if: matrix.os == 'ubuntu-latest'
run: |
cp dist/*.AppImage linux-installer
cd linux-installer
chmod +x *.AppImage
chmod +x *.sh
chmod +x mtga-tracker-daemon/*.sh
chmod +x mtga-tracker-daemon/bin/mtga-tracker-daemon
tar czvf "../dist/mtgatool-desktop-linux-installer.tar.gz" *
cd ..
- name: Upload Release Asset
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: ./dist/mtgatool-desktop-linux-installer.tar.gz
asset_name: mtgatool-desktop-linux-installer.tar.gz
asset_content_type: application/gzip