Skip to content

CI: release artifacts #47

CI: release artifacts

CI: release artifacts #47

Workflow file for this run

name: CI for GDCEF
on:
workflow_dispatch:
branches:
- master
- dev-godot-4
push:
branches:
- master
- dev-godot-4
tags:
- '*'
pull_request:
branches:
- master
- dev-godot-4
jobs:
#############################################################################
### Linux
#############################################################################
build_linux:
name: Build on Linux
runs-on: ubuntu-20.04
steps:
- name: Checkout GDCEF
uses: actions/checkout@v3
with:
submodules: true
- name: Install system packages
run: |
sudo apt-get update
cd addons/gdcef
python3 -m pip install -r requirements.txt
- name: Compile GDCEF
run: |
cd addons/gdcef
python3 build.py
- name: Check build
run: |
ls build/gdcefSubProcess build/libgdcef.so build/libcef.so
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gdcef-artifacts-godot_4-linux_x86_64
path: build/
#############################################################################
### Windows
#############################################################################
build_windows:
name: Build on Windows
runs-on: windows-2022
steps:
# Add path for finding cl.exe
# FIXME: I dunno why Godot editor and godot-cpp can find cl.exe while our
# godot native modules cannot find it without this extra path
- uses: ilammy/[email protected]
- name: Checkout GDCEF
uses: actions/checkout@v4
with:
submodules: true
- name: Install system packages
shell: powershell
run: |
cd addons/gdcef
python3 -m pip install -r requirements.txt
- name: Compile GDCEF
shell: powershell
run: |
cd addons/gdcef
python3 build.py
- name: Check build
run: |
cd build
Test-Path -Path \a\gdcef\gdcef\build\gdcefSubProcess.exe
Test-Path -Path \a\gdcef\gdcef\build\libgdcef.dll
Test-Path -Path \a\gdcef\gdcef\build\libcef.dll
cd -
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gdcef-artifacts-godot_4-windows_x86_64
path: build/
#############################################################################
### Release artifacts
#############################################################################
release:
name: Releases
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
needs: [build_linux, build_windows]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Compress
run: |
ls -R artifacts
tar -czvf gdcef-artifacts-godot_4-linux_x86_64.tar.gz artifacts/gdcef-artifacts-godot_4-linux_x86_64
tar -czvf gdcef-artifacts-godot_4-windows_x86_64.tar.gz artifacts/gdcef-artifacts-godot_4-windows_x86_64
- name: Do release
uses: ncipollo/release-action@v1
with:
artifacts: "gdcef-artifacts-godot_4-*.tar.gz"