Skip to content

Commit a6a7a2d

Browse files
authored
Update build.yml
1 parent 7ce21ff commit a6a7a2d

1 file changed

Lines changed: 47 additions & 47 deletions

File tree

.github/workflows/build.yml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
11
name: Build & Publish Installers
22

33
on:
4-
push: # every commit
4+
push:
55
branches: [ main ]
6-
workflow_dispatch: # manual trigger
6+
workflow_dispatch:
77
release:
8-
types: [created] # re‑run when you draft a release
8+
types: [created]
99

1010
jobs:
1111
build:
1212
strategy:
1313
matrix:
14-
os: [ubuntu-latest, windows-latest, macos-latest]
15-
py: [ '3.12' ] # adjust if you need multiple versions
14+
os: [ubuntu-latest, windows-latest, macos-latest]
15+
py: ['3.12']
1616
runs-on: ${{ matrix.os }}
1717

1818
steps:
19-
- name: Checkout source
20-
uses: actions/checkout@v4
19+
- name: Checkout source
20+
uses: actions/checkout@v4
2121

22-
- name: Set up Python
23-
uses: actions/setup-python@v5
24-
with:
25-
python-version: ${{ matrix.py }}
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.py }}
2626

27-
- name: Install dependencies
28-
run: |
29-
python -m pip install --upgrade pip
30-
pip install -r requirements.txt
31-
pip install pyinstaller
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -r requirements.txt
31+
pip install pyinstaller
3232
33-
- name: Build executable
34-
run: |
35-
pyinstaller --clean --noconfirm NexumAI.spec
36-
# Output ends up in dist/NexumAI[.exe|.app|]
33+
- name: Build executable
34+
run: |
35+
pyinstaller --clean --noconfirm NexumAI.spec
36+
# Output is in dist/NexumAI[.exe|.app|]
3737

38-
- name: Archive artifact
39-
uses: actions/upload-artifact@v4
40-
with:
41-
name: NexumAI-${{ matrix.os }}
42-
path: |
43-
dist/**
44-
!dist/**/*.log
38+
- name: Archive artifact
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: NexumAI-${{ matrix.os }}
42+
path: |
43+
dist/**
44+
!dist/**/*.log
4545
4646
release:
4747
needs: build
48-
if: github.event_name == 'push' # only auto‑release on pushes (skip manual runs)
48+
if: github.event_name == 'release' && github.event.action == 'created'
4949
runs-on: ubuntu-latest
50+
5051
steps:
51-
- name: Download all artifacts
52-
uses: actions/download-artifact@v4
53-
with:
54-
path: installers
52+
- name: Download all artifacts
53+
uses: actions/download-artifact@v4
54+
with:
55+
path: installers
5556

56-
- name: Create GitHub release
57-
uses: softprops/action-gh-release@v2
58-
with:
59-
tag_name: ${{ github.sha }}
60-
name: Nightly ${{ github.sha }}
61-
body: |
62-
Automated build from commit ${{ github.sha }}
63-
env:
64-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
- name: Create GitHub release
58+
uses: softprops/action-gh-release@v2
59+
with:
60+
tag_name: ${{ github.event.release.tag_name }}
61+
name: ${{ github.event.release.name }}
62+
body: ${{ github.event.release.body }}
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6565

66-
- name: Upload installers to release
67-
uses: softprops/action-gh-release@v2
68-
with:
69-
files: installers/**/*
70-
env:
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
- name: Upload installers to release
67+
uses: softprops/action-gh-release@v2
68+
with:
69+
files: installers/**/*
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)