Add NativeAOT-LLVM example #134
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-update-bindings: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup .NET 8 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Generate Bindings | |
run: dotnet build -c Release src/Raylib.NET.Bindgen | |
- name: Test | |
run: dotnet test -p:SkipNatives=true -p:SkipBindgen=true | |
- name: Build | |
run: dotnet build -c Release -p:SkipNatives=true -p:SkipBindgen=true | |
- name: Push Changes | |
run: | | |
git config --global user.name github-actions | |
git config --global user.email [email protected] | |
if [ -n "$(git status --porcelain)" ]; then | |
git add . | |
git commit -m "Update bindings [ci skip]" | |
git push | |
else | |
echo "No changes to commit" | |
fi | |
upload-packages: | |
permissions: | |
packages: write | |
runs-on: ubuntu-latest | |
needs: | |
- build-and-update-bindings | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET 8 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Generate NuGet Version | |
id: package-info | |
run: | | |
version="build.$(git rev-list --count HEAD)" | |
echo "version=$version" >> $GITHUB_OUTPUT | |
- name: Create NuGet Packages | |
run: | | |
dotnet pack -c Release --output nuget -p:SkipNatives=true -p:SkipBindgen=true -p:VersionSuffix=${{ steps.package-info.outputs.version }} | |
rm -rf nuget/Raylib.NET.Native* | |
- name: Upload NuGet Packages As Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nuget-packages | |
path: nuget/* | |
- name: Publish NuGet Packages to GitHub Packages | |
run: dotnet nuget push nuget/*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate |