diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 61b63dc..8ef0c05 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,12 +1,10 @@ --- name: .Net Build on: - pull_request: null + pull_request: push: branches: - master - tags: - - "*" env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_CLI_TELEMETRY_OPTOUT: 1 @@ -25,4 +23,4 @@ jobs: - name: Update Submodules run: git submodule update --init --recursive - name: Build - run: dotnet build --configuration Release --nologo + run: dotnet build --configuration Release --nologo \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..8ea98d4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +--- +name: Publish Nuget +on: + push: + tags: + - "*" +env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 +jobs: + publish: + name: Publish Nuget + runs-on: ubuntu-latest + steps: + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.* + - name: Publish Reason + run: echo ${{github.ref}} and ${{github.event_name}} + - name: Get version from tag + run: echo "VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - name: publish on version change + uses: brandedoutcast/publish-nuget@v2 + with: + PROJECT_FILE_PATH: src\Carter.SirenNegotiator.csproj + PACKAGE_NAME: Carter.SirenNegotiator + NUGET_KEY: ${{ secrets.NUGET_API_KEY }} + VERSION_STATIC: ${{ env.VERSION }}