From 9eafa45a195b1423b6e47ee64b5f1180f307786c Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Fri, 7 Aug 2020 12:56:59 -0400 Subject: [PATCH] Create publish-analyzer.yaml --- .github/workflows/publish-analyzer.yaml | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/publish-analyzer.yaml diff --git a/.github/workflows/publish-analyzer.yaml b/.github/workflows/publish-analyzer.yaml new file mode 100644 index 0000000..34418fd --- /dev/null +++ b/.github/workflows/publish-analyzer.yaml @@ -0,0 +1,31 @@ +name: publish to nuget +on: + push: + branches: + - master # Your default release branch + paths: + - '/src/Ardalis.ApiEndpoints.CodeAnalyzers/**' +jobs: + publish: + name: list on nuget + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + # Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest + # Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest + - name: Setup dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.100 + + # Publish + - name: publish on version change + uses: rohith/publish-nuget@v2 + with: + PROJECT_FILE_PATH: src/Ardalis.ApiEndpoints.CodeAnalyzers/Ardalis.ApiEndpoints.CodeAnalyzers.csproj # Relative to repository root + # VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file + VERSION_REGEX: (.*)<\/Version> # Regex pattern to extract version info in a capturing group + TAG_COMMIT: true # Flag to enable / disable git tagging + TAG_FORMAT: Analyzer_v* # Format of the git tag, [*] gets replaced with version + NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key