Skip to content

set_github_release

Community Action Reference: Inspected directly from Fastlane core ruby gem definitions.

Supported Platforms: ios, android, mac

This will create a new release on GitHub and upload assets for it

Details

Creates a new release on GitHub. You must provide your GitHub Personal token (get one from https://github.com/settings/tokens/new), the repository name and tag name. By default, that’s master. If the tag doesn’t exist, one will be created on the commit or branch passed in as commitish. Out parameters provide the release’s id, which can be used for later editing and the release HTML link to GitHub. You can also specify a list of assets to be uploaded to the release with the :upload_assets parameter.

Parameters & Options

Total options available: 12

Key Type Env Variable Default Required Description
repository_name String FL_SET_GITHUB_RELEASE_REPOSITORY_NAME - Yes The path to your repo, e.g. ‘fastlane/fastlane’
server_url String FL_GITHUB_RELEASE_SERVER_URL https://api.github.com No The server url. e.g. ‘https://your.internal.github.host/api/v3’ (Default: ‘https://api.github.com’)
api_token String FL_GITHUB_RELEASE_API_TOKEN - No Personal API Token for GitHub - generate one at https://github.com/settings/tokens
api_bearer String FL_GITHUB_RELEASE_API_BEARER - No Use a Bearer authorization token. Usually generated by GitHub Apps, e.g. GitHub Actions GITHUB_TOKEN environment variable
tag_name String FL_SET_GITHUB_RELEASE_TAG_NAME - Yes Pass in the tag name
name String FL_SET_GITHUB_RELEASE_NAME - No Name of this release
commitish String FL_SET_GITHUB_RELEASE_COMMITISH - No Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository’s default branch (usually master)
description String FL_SET_GITHUB_RELEASE_DESCRIPTION - No Description of this release
is_draft Fastlane::Boolean FL_SET_GITHUB_RELEASE_IS_DRAFT false No Whether the release should be marked as draft
is_prerelease Fastlane::Boolean FL_SET_GITHUB_RELEASE_IS_PRERELEASE false No Whether the release should be marked as prerelease
is_generate_release_notes Fastlane::Boolean FL_SET_GITHUB_RELEASE_IS_GENERATE_RELEASE_NOTES false No Whether the name and body of this release should be generated automatically
upload_assets Array FL_SET_GITHUB_RELEASE_UPLOAD_ASSETS - No Path to assets to be uploaded with the release

Lane Context Shared Values

This action writes the following values to Actions.lane_context[SharedValues::...]:

Key Description
SharedValues::SET_GITHUB_RELEASE_HTML_LINK Link to your created release
SharedValues::SET_GITHUB_RELEASE_RELEASE_ID Release id (useful for subsequent editing)
SharedValues::SET_GITHUB_RELEASE_JSON The whole release JSON object

Examples

github_release = set_github_release(
repository_name: "fastlane/fastlane",
api_token: ENV["GITHUB_TOKEN"],
name: "Super New actions",
tag_name: "v1.22.0",
description: (File.read("changelog") rescue "No changelog provided"),
commitish: "master",
upload_assets: ["example_integration.ipa", "./pkg/built.gem"]
)

Source & Upstream