-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (75 loc) · 2.44 KB
/
executable.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: Executable
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
- run: python -m pip install -r requirements.txt
- run: python -m PyInstaller --onefile --noconsole randwall
- uses: actions/upload-artifact@v4
with:
name: "randwall_${{ runner.os }}"
path: dist
release:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: release-drafter/release-drafter@v5
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: randwall_Linux
path: dist/linux
- run: chmod +x dist/linux/randwall
- run: tar -pczvf linux.tar.gz -C dist/linux randwall
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./linux.tar.gz
asset_name: randwall_standalone_linux-x64.tar.gz
asset_content_type: application/octet-stream
- uses: actions/download-artifact@v4
with:
name: randwall_macOS
path: dist/macos
- run: chmod +x dist/macos/randwall
- run: tar -pczvf macos.tar.gz -C dist/macos randwall
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./macos.tar.gz
asset_name: randwall_standalone_macos-x64.tar.gz
asset_content_type: application/octet-stream
- uses: actions/download-artifact@v4
with:
name: randwall_Windows
path: dist/windows
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/windows/randwall.exe
asset_name: randwall_standalone_windows-x64.exe
asset_content_type: application/octet-stream