-
Notifications
You must be signed in to change notification settings - Fork 13
84 lines (70 loc) · 2.21 KB
/
build_and_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
name: Build and publish release
on:
workflow_dispatch:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
permissions: write-all
jobs:
build-on-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.9]
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies core
run: |
python -m pip install --upgrade pip
pip install -r .\packages\core\requirements.txt
- name: Install dependencies app
run: |
npm run install:app
- name: Build App
run: |
npm run build:app
- name: Build with pyinstaller
run: |
pyinstaller config/windows.spec
- uses: actions/upload-artifact@v2
with:
name: app_windows
path: .\dist\Epic7 Bot.exe
create-release:
runs-on: ubuntu-latest
needs: [build-on-windows]
steps:
- uses: actions/download-artifact@v2
with:
path: ./
- name: Create github release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
body: |
Please refer to [CHANGELOG.md](https://github.com/brunocordioli072/epic7_bot/blob/${{ github.ref_name }}/CHANGELOG.md) for details.
- name: Upload windows artifact to github release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./app_windows/Epic7 Bot.exe
asset_name: Epic7 Bot.exe
asset_content_type: application