Skip to content

Latest commit

 

History

History
74 lines (63 loc) · 3.23 KB

releases-create.md

File metadata and controls

74 lines (63 loc) · 3.23 KB

Create a release

A composite action that creates a comment on Github. Requires the contents: write permission to work.

Inputs

Name Description Default
tag-name (*) The name of the tag to associated to the release. N/A
body The body of the release description ""
draft true to create a draft (unpublished) release, false to create a published one. "false"
generate-release-notes Whether to automatically generate the name and body for this release. If name is specified, the specified name will be used; otherwise, a name will be automatically generated. If body is specified, the body will be pre-pended to the automatically generated notes. "false"
github-token The default token to use for this Git operation. If unspecified, this will default to github.token. "${{ github.token }}"
name The name to give this artifact. Must be unique. ""
owner The repository owner. If unspecified, this will default to the owner of the current repository. ""
prerelease true to identify the release as a prerelease. false to identify the release as a full release. "false"
repo The name of the repository. If unspecified, this will default to the current repository. ""
retries The number of times to attempt to retry if this fails. "0"
retry-exempt-status-codes A list of error-codes that are exempt from being retried. "400,401,403,404,422"
target-commitish The commitish that will refer to where this release is created from. ""

Note: (*) marks required inputs

Outputs

Name Description
release-api-url The API URL to the release
release-id The ID of the created release
release-tag The release tag used for the release.
release-url The browser URL leading to the release page

Example

Here is a very basic example of how to use the releases/create composite action in a project (placeholders are used in place of real inputs):

run:
  example-job:
    # ... 
    steps:
      # ... 
      - name: Create a release
        id: releases-create # only necessary if using this action's output(s)
        uses: bitwizeshift/actions-github/releases/create@v1
        with:
          # Required inputs
          tag-name: TAG_NAME

          # Optional inputs
          body: BODY
          draft: DRAFT
          generate-release-notes: GENERATE_RELEASE_NOTES
          github-token: GITHUB_TOKEN
          name: NAME
          owner: OWNER
          prerelease: PRERELEASE
          repo: REPO
          retries: RETRIES
          retry-exempt-status-codes: RETRY_EXEMPT_STATUS_CODES
          target-commitish: TARGET_COMMITISH
      # ... 
      - name: Uses "Create a release" Outputs
        uses: example-actions/use-releases-create@v3 # illustrative
        with:
          use-release-api-url: ${{ steps.releases-create.outputs.release-api-url }}
          use-release-id: ${{ steps.releases-create.outputs.release-id }}
          use-release-tag: ${{ steps.releases-create.outputs.release-tag }}
          use-release-url: ${{ steps.releases-create.outputs.release-url }}