Skip to content

GRPC clients version 10.1.6 #80

GRPC clients version 10.1.6

GRPC clients version 10.1.6 #80

Workflow file for this run

name: Publish package
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9a-zA-Z]+' # Matches 1.2.3, 1.2.3alpha1 etc.
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Publish to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
rm -rf Clarifai/bin/Release
dotnet restore
dotnet pack -c Release
dotnet nuget push Clarifai/bin/Release/ClarifaiGrpc.${{ steps.get_version.outputs.VERSION }}.nupkg -k $NUGET_API_KEY -s https://www.nuget.org/api/v2/package
- name: Create GitHub Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
file: Clarifai/bin/Release/ClarifaiGrpc.${{ steps.get_version.outputs.VERSION }}.nupkg
draft: false
prerelease: false
- name: Upload nupkg to GitHub Release
id: upload_release_asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Clarifai/bin/Release/ClarifaiGrpc.${{ steps.get_version.outputs.VERSION }}.nupkg
asset_name: ClarifaiGrpc.${{ steps.get_version.outputs.VERSION }}.nupkg
asset_content_type: application/octet-stream
- name: Slack Notify
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_ICON: "https://raw.githubusercontent.com/github/explore/2c7e603b797535e5ad8b4beb575ab3b7354666e1/topics/actions/actions.png"
SLACK_USERNAME: "GitHub Alerts"
SLACK_CHANNEL: "#grpc-client-repo-alerts"
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: "Publish failure"
SLACK_FOOTER: "Clarifai CSharp GRPC Repo"