diff --git a/.github/workflows/build-pipeline.yml b/.github/workflows/build-pipeline.yml index ff7929b..784a473 100644 --- a/.github/workflows/build-pipeline.yml +++ b/.github/workflows/build-pipeline.yml @@ -47,54 +47,15 @@ jobs: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - #Run code ql check - #code-ql-check: - # uses: ./.github/workflows/codeql.yml - - #Publish to nuget if version tag change detected - publish-and-push-nuget: - name: 'Build and publish to NuGet' + #Deplay package + publish-package: + name: 'Build and publish package' needs: [run-unit-tests, ] - runs-on: ubuntu-latest + runs-on: [self-hosted, linux, x64, womed-local-linux] 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 + - name: Publish + run: | + cd "./Builds" + dotnet nuget push "*.nupkg" --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/WOmed/index.json" + #dotnet nuget push "*.nupkg" --skip-duplicate --api-key ${{ secrets.NUGET_KEY }} --source "https://api.nuget.org"