[Update lookup to latest version from fingermath #73
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 and test | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
packages: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.1.0 | |
with: | |
fetch-depth: 0 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 2.2.108 | |
source-url: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Restore packages | |
run: dotnet restore | |
- name: Build | |
run: dotnet build | |
- name: Test | |
run: dotnet test | |
- name: Pack for version | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: dotnet pack -c Release -p:PackageVersion=${GITHUB_REF:11} | |
- name: Pack without version | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
run: dotnet pack -c Release -p:PackageVersion=1.0.0.0 | |
- name: Upload windows artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nuget | |
path: ./BrainAI/bin/Release/BrainAI.*.nupkg | |
godot: | |
needs: build | |
runs-on: ubuntu-latest | |
name: Build artifacts | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3.1.0 | |
with: | |
fetch-depth: 0 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 2.2.108 | |
source-url: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Restore packages | |
run: | | |
dotnet restore "./BrainAI.Demo/BrainAI Demo.sln" | |
- name: Export game | |
id: export | |
uses: firebelley/godot-export@v4.4.0 | |
with: | |
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.5.1/mono/Godot_v3.5.1-stable_mono_linux_headless_64.zip | |
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.5.1/mono/Godot_v3.5.1-stable_mono_export_templates.tpz | |
relative_project_path: ./BrainAI.Demo/ | |
export_debug: false | |
use_preset_export_path: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload pages artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ${{ steps.export.outputs.build_directory }}/HTML5 | |
deploy_html5: | |
needs: godot | |
name: Deploy to github pages | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Pages | |
uses: actions/configure-pages@v2 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 | |
pack: | |
needs: build | |
name: deploy | |
runs-on: windows-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: nuget | |
path: ./artifacts | |
- name: Setup nuget | |
uses: nuget/setup-nuget@v1 | |
with: | |
nuget-version: 'latest' | |
- name: Setup nuget config | |
run: nuget.exe sources add -name github -source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" -username ${{ github.actor }} -password ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload to GitHub Packages | |
run: | | |
for f in ./artifacts/*.nupkg | |
do | |
nuget push $f -Source "github" | |
done | |
shell: bash |