Update changelog and pubspec. #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Godot Dart Extension | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
include: | |
- os: windows-latest | |
artifact-name: windows-x64 | |
artifact-path: Release/godot_dart.dll | |
- os: ubuntu-latest | |
artifact-name: linux-x64 | |
artifact-path: libgodot_dart.so | |
- os: macos-latest | |
artifact-name: macos | |
artifact-path: libgodot_dart.dylib | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: dart-lang/setup-dart@v1 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- run: dart pub get | |
working-directory: ./tools/binding_generator | |
- run: dart pub get | |
working-directory: ./tools/fetch_dart | |
- name: Fetch latest dart_shared_library | |
run: | | |
dart ./tools/fetch_dart/bin/fetch_dart.dart --verbose | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Shared Library | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=Release . -B "build" | |
cmake --build build --config release | |
working-directory: ./src/cpp | |
- name: 'Upload Artifact' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.artifact-name }} | |
path: ./src/cpp/build/${{ matrix.artifact-path }} | |
assemble: | |
runs-on: ubuntu-latest | |
needs: build | |
continue-on-error: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dart-lang/setup-dart@v1 | |
- uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- run: dart pub get | |
working-directory: ./tools/fetch_dart | |
- name: Fetch latest dart_shared_library | |
run: | | |
dart ./tools/fetch_dart/bin/fetch_dart.dart --verbose | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: "Create extension" | |
run: | | |
mkdir -p out/extension | |
cp -r src/assets/* out/extension | |
cp src/dart_dll/bin/release/dart_dll.dll out/extension | |
cp src/dart_dll/bin/release/libdart_dll.so out/extension | |
cp src/dart_dll/bin/release/libdart_dll.dylib out/extension | |
cp artifacts/windows-x64/godot_dart.dll out/extension | |
cp artifacts/linux-x64/libgodot_dart.so out/extension | |
cp artifacts/macos/libgodot_dart.dylib out/extension | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: godot-extension | |
path: out/extension | |