publish_sdk #85
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish | |
| on: | |
| push: | |
| branches: [master] | |
| repository_dispatch: | |
| types: [publish_sdk] | |
| workflow_dispatch: | |
| jobs: | |
| Publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '7.0.x' | |
| - name: Pack release | |
| run: dotnet pack --output releases --configuration Release | |
| - name: Push to NuGet | |
| run: dotnet nuget push releases/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
| - name: Slack notification | |
| uses: ravsamhq/notify-slack-action@v2 | |
| if: always() | |
| with: | |
| status: ${{ job.status }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| notification_title: "{repo}: {workflow} workflow" | |
| message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>" | |
| footer: "<{workflow_url}|View Workflow>" | |
| notify_when: "failure" | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |