refactor: add aot build in makefile by default #30
This file contains hidden or 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: Continuous Integration | |
| on: | |
| push: | |
| branches: [develop, master] | |
| paths-ignore: | |
| - '**.md' | |
| - '.gitignore' | |
| - 'LICENSE' | |
| - 'docs/**' | |
| concurrency: | |
| group: ci-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| ci: | |
| name: CI Build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Restore | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore --configuration Release | |
| - name: Test & Coverage | |
| run: | | |
| dotnet test --no-build --configuration Release \ | |
| --collect:"XPlat Code Coverage" \ | |
| --results-directory ./coverage-results | |
| - name: Pack NuGet (validation) | |
| run: | | |
| dotnet pack --no-restore --configuration Release \ | |
| -p:IncludeSymbols=true \ | |
| -p:IncludeSource=true \ | |
| --output ./nupkgs | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: nupkgs | |
| path: ./nupkgs/ | |
| retention-days: 30 | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-results | |
| path: ./coverage-results/ | |
| retention-days: 30 | |
| - name: Security audit | |
| run: dotnet list package --vulnerable --include-transitive | |
| - name: Push to GitHub Packages (master only) | |
| if: github.ref_name == 'master' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| for pkg in ./nupkgs/*.nupkg; do | |
| if [[ "$pkg" != *.snupkg ]]; then | |
| dotnet nuget push "$pkg" \ | |
| --source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \ | |
| --api-key "${{ secrets.GITHUB_TOKEN }}" \ | |
| --skip-duplicate | |
| fi | |
| done |