Skip to content

Latest commit

 

History

History
67 lines (55 loc) · 2.05 KB

README.md

File metadata and controls

67 lines (55 loc) · 2.05 KB

Publish Release Notes

Github action to publish release notes, possible options:

Needs release in event context of the workflow.

Usage

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 }}
    

Microsoft Teams Channel or Chat

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

Usage

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 }}

API Request

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"
      }

Usage

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 }}