From c8f37258402dc65a87ffa57f0680c2c90229ddc8 Mon Sep 17 00:00:00 2001 From: Alexey Sosnin Date: Tue, 6 Feb 2024 02:21:18 +0300 Subject: [PATCH] ci: fix AOT build (#25) --- .github/workflows/release.yml | 2 +- ...ve-aot.yml => test-native-aot-publish.yml} | 30 ++++--------------- Directory.Build.props | 2 +- src/Heartbeat/Program.cs | 4 +++ 4 files changed, 12 insertions(+), 26 deletions(-) rename .github/workflows/{native-aot.yml => test-native-aot-publish.yml} (51%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe68d68..c2f1dd1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,6 +78,6 @@ jobs: - name: Release uses: softprops/action-gh-release@v1 with: - draft: true + draft: false generate_release_notes: true files: release-artifacts/** diff --git a/.github/workflows/native-aot.yml b/.github/workflows/test-native-aot-publish.yml similarity index 51% rename from .github/workflows/native-aot.yml rename to .github/workflows/test-native-aot-publish.yml index 82aac2c..6588b0b 100644 --- a/.github/workflows/native-aot.yml +++ b/.github/workflows/test-native-aot-publish.yml @@ -1,17 +1,14 @@ -name: Publish native AOT +name: Test native AOT publish on: - push: - branches: [ disabled ] + pull_request: + branches: + - master jobs: build-aot: - name: Build Native AOT - strategy: - matrix: - # https://github.com/actions/runner-images - os: [ubuntu-latest, windows-latest] - runs-on: ${{ matrix.os }} + name: Build Native AOT PR + runs-on: ubuntu-latest env: # temp fix frontend build # Treating warnings as errors because process.env.CI = true. @@ -33,18 +30,3 @@ jobs: shell: pwsh run: | ./scripts/publish-native-aot.ps1 - # TODO join steps - - name: 'Upload Artifact linux-x64' - if: ${{ matrix.os == 'ubuntu-latest' }} - uses: actions/upload-artifact@v4 - with: - name: Heartbeat-linux-x64 - path: artifacts/linux-x64/ - retention-days: 1 - - name: 'Upload Artifact win-x64' - if: ${{ matrix.os == 'windows-latest' }} - uses: actions/upload-artifact@v4 - with: - name: Heartbeat-win-x64 - path: artifacts/win-x64/ - retention-days: 1 diff --git a/Directory.Build.props b/Directory.Build.props index 5a1f902..a67c4ae 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,7 +7,7 @@ - 0.8.0 + 0.8.1 https://github.com/Ne4to/Heartbeat true MIT diff --git a/src/Heartbeat/Program.cs b/src/Heartbeat/Program.cs index 90cb963..ff5d069 100644 --- a/src/Heartbeat/Program.cs +++ b/src/Heartbeat/Program.cs @@ -4,6 +4,10 @@ using System.CommandLine; +#if AOT +using Microsoft.Extensions.FileProviders; +#endif + #if OPENAPI using Heartbeat.Host.Extensions; using System.Text.Json.Serialization;