Skip to content

3.6.0-rc.1

3.6.0-rc.1 #25

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# Workflow to execute when a publish is made on github https://github.com/apache/pulsar-dotpulsar/releases/new
name: published
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set nuget package version from git tag
if: ${{ github.ref_type == 'tag' }}
env:
TAG: ${{ github.ref_name }}
run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Build library (Release)
run: dotnet build --no-restore /p:PackageVersion=$VERSION /p:ContinuousIntegrationBuild=true -c release src/DotPulsar/DotPulsar.csproj
- name: Create nuget package
run: dotnet pack /p:PackageVersion=$VERSION /p:ContinuousIntegrationBuild=true -c release --include-symbols
- name: Publish the package to nuget.org
run: dotnet nuget push src/DotPulsar/bin/Release/*.nupkg --api-key $NUGET_AUTH_TOKEN --source https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_KEY }}
# build-web-api:
# timeout-minutes: 30
# needs: build
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# steps:
# - name: Check Out
# uses: actions/checkout@v3
#
# - name: Setup .NET
# uses: actions/setup-dotnet@v3
# with:
# dotnet-version: '8.0.x'
#
# - name: Build docs with docfx
# run: |
# dotnet tool update -g docfx
# dotnet build -p:TargetFramework=net8.0
# docfx docs/api/docfx.json
#
# - name: Deploy to GitHub Pages
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: docs/api/_site