-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (47 loc) · 1.39 KB
/
build-packages.yaml
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
name: Build Packages
on: push
permissions:
contents: write # required by `action-gh-release`
env:
python-version: "3.12"
jobs:
package:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2019, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # required by `git describe`
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Install APT dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libsdl2-dev
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Run build.py
run: python build.py
- name: Upload artifact # upload to GitHub Actions
uses: actions/upload-artifact@v4
with:
name: package-${{ matrix.os }}
path: dist/*.*
retention-days: 7
compression-level: 0
if-no-files-found: error
- name: Upload release # upload to GitHub Releases when a tag is pushed
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: dist/*.*
fail_on_unmatched_files: true