Update CI workflow for main branch and release events
This commit is contained in:
parent
cbd4b459bb
commit
6a4e3de7a3
1 changed files with 12 additions and 23 deletions
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
|
@ -54,7 +54,14 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
ncc build --config release --log-level debug
|
ncc build --config release --log-level debug
|
||||||
|
|
||||||
|
- name: Upload build artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ncc-build
|
||||||
|
path: build/
|
||||||
|
|
||||||
release:
|
release:
|
||||||
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: php:8.3
|
image: php:8.3
|
||||||
|
@ -64,28 +71,10 @@ jobs:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Download build artifacts
|
||||||
run: |
|
uses: actions/download-artifact@v4
|
||||||
apt update -yqq
|
with:
|
||||||
apt install git libpq-dev libzip-dev zip make wget gnupg -yqq
|
name: ncc-build
|
||||||
|
|
||||||
- name: Install latest version of NCC
|
|
||||||
run: |
|
|
||||||
git clone https://git.n64.cc/nosial/ncc.git
|
|
||||||
cd ncc
|
|
||||||
make redist
|
|
||||||
# Find the dynamically generated NCC directory
|
|
||||||
NCC_DIR=$(find build/ -type d -name "ncc_*" | head -n 1)
|
|
||||||
if [ -z "$NCC_DIR" ]; then
|
|
||||||
echo "NCC build directory not found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
php "$NCC_DIR/INSTALL" --auto --install-composer
|
|
||||||
cd .. && rm -rf ncc
|
|
||||||
|
|
||||||
- name: Build project for release
|
|
||||||
run: |
|
|
||||||
ncc build --config release --log-level debug
|
|
||||||
|
|
||||||
- name: Upload release artifact to GitHub
|
- name: Upload release artifact to GitHub
|
||||||
run: |
|
run: |
|
||||||
|
@ -101,4 +90,4 @@ jobs:
|
||||||
else
|
else
|
||||||
echo "Build artifact not found"
|
echo "Build artifact not found"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
Loading…
Add table
Reference in a new issue