From affa2ea83f0864930f1454cf45d82ed0020693fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Wei=C3=9F?= <72068105+Sandoun@users.noreply.github.com> Date: Tue, 13 Jun 2023 12:49:33 +0200 Subject: [PATCH] Merged CI into one workflow file --- .github/workflows/publish.yml | 53 -------------------------- .github/workflows/test-on-hardware.yml | 47 +++++++++++++++++++++++ 2 files changed, 47 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 913f0a1..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: publish to nuget -on: - workflow_run: - workflows: ["Test mewtocol on real hardware"] - types: - - completed -jobs: - publish: - name: build, pack & publish - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - # Publish - - name: publish on version change - id: publish_nuget - uses: brandedoutcast/publish-nuget@v2 - with: - # Filepath of the project to be packaged, relative to root of repository - PROJECT_FILE_PATH: MewtocolNet/MewtocolNet.csproj - - # Configuration to build and package - # BUILD_CONFIGURATION: Release - - # Platform target to compile (default is empty/AnyCPU) - # BUILD_PLATFORM: x64 - - # NuGet package id, used for version detection & defaults to project name - PACKAGE_NAME: Mewtocol.NET - - # Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH - # VERSION_FILE_PATH: Directory.Build.props - - # Regex pattern to extract version info in a capturing group - # VERSION_REGEX: ^\s*(.*)<\/Version>\s*$ - - # Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX - # VERSION_STATIC: 1.0.0 - - # Flag to toggle git tagging, enabled by default - # TAG_COMMIT: true - - # Format of the git tag, [*] gets replaced with actual version - # TAG_FORMAT: v* - - # API key to authenticate with NuGet server - NUGET_KEY: ${{secrets.NUGET_KEY}} - - # NuGet server uri hosting the packages, defaults to https://api.nuget.org - # NUGET_SOURCE: https://api.nuget.org - - # Flag to toggle pushing symbols along with nuget package to the server, disabled by default - # INCLUDE_SYMBOLS: false diff --git a/.github/workflows/test-on-hardware.yml b/.github/workflows/test-on-hardware.yml index 708862b..5a08d34 100644 --- a/.github/workflows/test-on-hardware.yml +++ b/.github/workflows/test-on-hardware.yml @@ -37,3 +37,50 @@ jobs: run: | cd '${{ github.workspace }}/MewtocolTests' dotnet test --logger:"console;verbosity=detailed" + + publish-and-push-nuget: + name: 'Build and publish to NuGet' + needs: run-unit-tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + # Publish + - name: publish on version change + id: publish_nuget + uses: brandedoutcast/publish-nuget@v2 + with: + # Filepath of the project to be packaged, relative to root of repository + PROJECT_FILE_PATH: MewtocolNet/MewtocolNet.csproj + + # Configuration to build and package + # BUILD_CONFIGURATION: Release + + # Platform target to compile (default is empty/AnyCPU) + # BUILD_PLATFORM: x64 + + # NuGet package id, used for version detection & defaults to project name + PACKAGE_NAME: Mewtocol.NET + + # Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH + # VERSION_FILE_PATH: Directory.Build.props + + # Regex pattern to extract version info in a capturing group + # VERSION_REGEX: ^\s*(.*)<\/Version>\s*$ + + # Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX + # VERSION_STATIC: 1.0.0 + + # Flag to toggle git tagging, enabled by default + # TAG_COMMIT: true + + # Format of the git tag, [*] gets replaced with actual version + # TAG_FORMAT: v* + + # API key to authenticate with NuGet server + NUGET_KEY: ${{secrets.NUGET_KEY}} + + # NuGet server uri hosting the packages, defaults to https://api.nuget.org + # NUGET_SOURCE: https://api.nuget.org + + # Flag to toggle pushing symbols along with nuget package to the server, disabled by default + # INCLUDE_SYMBOLS: false \ No newline at end of file