-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (58 loc) · 1.93 KB
/
build-and-deploy.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
name: Build & Deploy
on:
release:
types: [published]
jobs:
build-and-deploy-python-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
python -m pip install twine
pip install -r requirements.txt
- name: Build Package
run: python -m build
- name: Publish Package
run: python3 -m twine upload dist/* --verbose
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{secrets.PYPI_API_TOKEN}}
build-desktop-app:
runs-on: windows-latest
needs: build-and-deploy-python-package
steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: '18'
- name: Install dependencies
run: npm install
working-directory: ./application
- name: Package Webpack
run: npm run package
working-directory: ./application
- name: Build Installer
run: npm run make-installer:win
working-directory: ./application
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Rename Installer
run: mv "dist/Keyboard Sounds Setup *.exe" "dist/Keyboard-Sounds-Setup-windows-x64.exe"
working-directory: ./application
- name: Rename Blockmap
run: mv "dist/Keyboard Sounds Setup *.exe.blockmap" "dist/Keyboard-Sounds-Setup-windows-x64.exe.blockmap"
working-directory: ./application
- name: Upload Artifacts
uses: softprops/action-gh-release@v2
with:
files: |
application/dist/Keyboard-Sounds-Setup-windows-x64.exe
application/dist/Keyboard-Sounds-Setup-windows-x64.exe.blockmap