Update to .NET 8 #31
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: Continious Integration | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
defaults: | |
run: | |
shell: bash | |
# Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
name: "Build" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Setup Pages | |
if: github.ref == 'refs/heads/master' | |
uses: actions/configure-pages@v3 | |
- name: Setup .NET 8 SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install wasm-tools workload | |
run: | | |
dotnet workload install wasm-tools | |
- name: Setup Verlite | |
run: | | |
verlite_version="$(grep '"Verlite\.MsBuild"' src/WebGL.Sample/WebGL.Sample.csproj | LC_ALL=en_US.utf8 grep -Po 'Version="\K[^"]+')" | |
dotnet tool install --global Verlite.CLI --version "$verlite_version" | |
verlite . --auto-fetch --verbosity verbatim | |
- name: Publish | |
run: | | |
dotnet publish --configuration Release -p:OutputPath="$(pwd)/build" | |
mv build/AppBundle artifacts | |
- name: Fix permissions | |
run: | | |
chmod -c -R +rX "artifacts/" | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts | |
path: | | |
artifacts/* | |
- name: Upload Pages Artifacts | |
uses: actions/upload-pages-artifact@v2 | |
if: github.ref == 'refs/heads/master' | |
with: | |
path: "artifacts" | |
# Deployment job | |
deploy: | |
name: "Deploy" | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |