This will allow subsequent actions to get access to the HTML URL for the release created with this. Handy for composing multiple actions together that are related to the release. In my case I wanted to get the URL into a slack message posted to the team when a release is published. The output can be referenced by using the `steps.release.ouput.url` in the workflow yaml: - name: Release id: release uses: softprops/action-gh-release@v1 with: name: "My Release" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Slack uses: csexton/slack-message-action@v1 with: message: New release posted at ${{ steps.release.outputs.url}}
34 lines
1008 B
YAML
34 lines
1008 B
YAML
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
|
|
name: 'GH Release'
|
|
description: 'Github Action for creating Github Releases'
|
|
author: 'softprops'
|
|
inputs:
|
|
body:
|
|
description: 'Note-worthy description of changes in release'
|
|
required: false
|
|
body_path:
|
|
description: 'Path to load note-worthy description of changes in release from'
|
|
required: false
|
|
name:
|
|
description: 'Gives the release a custom name. Defaults to tag name'
|
|
required: false
|
|
draft:
|
|
description: 'Creates a draft release. Defaults to false'
|
|
required: false
|
|
prerelease:
|
|
description: 'Identify the release as a prerelease. Defaults to false'
|
|
required: false
|
|
files:
|
|
description: 'Newline-delimited list of path globs for asset files to upload'
|
|
required: false
|
|
env:
|
|
'GITHUB_TOKEN': 'As provided by Github Actions'
|
|
outputs:
|
|
url:
|
|
description: 'URL to the Release HTML Page'
|
|
runs:
|
|
using: 'node12'
|
|
main: 'lib/main.js'
|
|
branding:
|
|
color: 'green'
|
|
icon: 'package' |