-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (57 loc) · 1.82 KB
/
build_mac_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
name: Build and Release to GH releases
on:
push:
branches: ['production']
jobs:
build:
name: Build for macos
runs-on: macos-latest
environment: prod
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8.18'
- name: Installing dependencies
run: pip3 install -r requirements.txt && pip install -r requirements.txt
- name: Build
shell: bash --noprofile --norc -eo pipefail {0}
run: pyinstaller --windowed --add-data assets:assets --name PyChip8 --hidden-import _tkinter src/main.py
- name: Packaging as DMG
run: |
hdiutil create \
-fs HFS+ \
-srcfolder "./dist/PyChip8.app" \
-volname "PyChip8" "./dist/PyChip8.dmg"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: PyChip8
path: dist/PyChip8.dmg
release-app:
name: Release App
runs-on: ubuntu-latest
needs: build
steps:
- name: Download site content
uses: actions/download-artifact@v3
with:
name: PyChip8
- name: Create GH release
id: creates_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.${{ github.run_number }}.0
release_name: v1.${{ github.run_number }}.0
- name: Upload release artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.creates_release.outputs.upload_url }}
asset_path: ./PyChip8.dmg
asset_name: macos_PyChip8-v1.${{ github.run_number }}.0.dmg
asset_content_type: application/dmg