-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (74 loc) · 2.24 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
67
68
69
70
71
72
73
74
name: "Build & Release App"
on:
push:
tags:
- "v*.*.*"
jobs:
build:
name: "Build App"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Unzip packageWindows archive
uses: DuckSoft/extract-7z-action@master
with:
pathSource : ./public/packageWindows.zip
pathTarget : ./public/
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 15.12.0
- name: Install Dependencies
run: npm install
- name: Build Project
run: npm run electron:build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Files
uses: actions/upload-artifact@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: files${{ runner.os }}
path: ./dist_electron/
release:
name: "Release App"
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, ubuntu-latest, windows-latest ]
steps:
- name: Set env variable with tags
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Create GitHub release
id: create_github_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_VERSION }}${{ runner.os }}
release_name: Release ${{ env.RELEASE_VERSION }} - ${{ runner.os }}
draft: true
prerelease: false
- name: Download Files
uses: actions/download-artifact@v2
with:
name: files${{ runner.os }}
- name: Archive app content
uses: thedoctor0/zip-release@master
with:
filename: files.zip
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_github_release.outputs.upload_url }}
asset_path: ./files.zip
asset_name: files.zip
asset_content_type: application/zip