Github action to publish release notes, possible options:
Needs release in event context of the workflow.
Please avoid using plain text i.e. webhook url or API key for public repositories. Use github secrets instead.
- name: Publish Release Notes
uses: tomkalesse/publish-release-notes@v2
with:
ms-teams-webhook: ${{ secrets.WEBHOOK_URL }}
api-endpoint: 'https://endpoint.dev/releases'
api-key: ${{ secrets.API_KEY }}
Create a Webhook URL for Microsoft Teams to publish the release as adaptive card in chat or channel. Hint: Use workflows instead of Office 365 connectors for Webhook URL
You only have to specify the "ms-teams-webhook" for using Microsoft Teams as destination.
- name: Publish Release Notes
uses: tomkalesse/publish-release-notes@v2
with:
ms-teams-webhook: ${{ secrets.WEBHOOK_URL }}
The request structure:
- Method: POST
- Header: 'api-key': ${key}
- Body:
{ "repo": "github.context.payload.repository.full_name", "title": "github.context.payload.release.name", "date": "github.context.payload.release.published_at", "notes": "github.context.payload.release.body.replace(/\n/g, ' \n\n')", "url": "github.context.payload.release.html_url" }
You only have to specify the "api-endpoint" and "api-key" for using an API Endpoint as destination.
- name: Publish Release Notes
uses: tomkalesse/publish-release-notes@v2
with:
api-endpoint: 'https://endpoint.dev/releases'
api-key: ${{ secrets.API_KEY }}