8 Commits

Author SHA1 Message Date
Chris McIntosh
818a8f0696
adding owner/repo options for remote releasing 2020-09-11 16:28:30 -05:00
Mike Coutermarsh
8210505c40
Merge branch 'master' into master 2020-07-01 07:26:37 -07:00
Jess Carlos
f37d718ae9
define body_path 2020-05-26 12:09:33 -07:00
fleskesvor
2b67105e25 Tag and release on a specific commitish 2019-12-29 09:06:12 +01:00
Steve Winton
d9c9ca3972
Merge pull request #11 from csexton/add-body
Include body parameter for release
2019-11-15 14:57:28 -08:00
Edward Thomson
de86cc55c4 Update action name and description 2019-11-08 16:02:58 +00:00
Christopher Sexton
becafb2f61 Include body parameter for release
Fixes #4

This adds the ability to include the body parameter when creating the
release.

    - name: Checkout code
      uses: actions/checkout@master
    - name: Create Release
      id: create_release
      uses: actions/create-release@master
      with:
        tag_name: ${{ github.ref }}
        release_name: Release ${{ github.ref }}
        body: Release body

This also supports a multiline body:

    - name: Create Release
      id: create_release
      uses: actions/create-release@master
      with:
        tag_name: ${{ github.ref }}
        release_name: Release ${{ github.ref }}
        body: |
          This is a multiline body
          with more than one
          line

Or if you want the contents of a file:

    - name: Read CHANGELOG
      id: changelog
      run: |
        echo "::set-output name=body::$(cat CHANGELOG.md)"
    - name: Create Release
      id: create_release
      uses: actions/create-release@master
      with:
        release_name: Release ${{ github.ref }}
        body: ${{ steps.changelog.outputs.body }}

One decision I made in favor of less code was to send an empty body when
there was non present. If it would be preferred to send nothing in the
request for the `body` attribute I could instead compose the parameters
with an optional body attribute:

    releaseParams = {
      owner,
      repo,
      tag_name: tag,
      name: releaseName,
      draft,
      prerelease
    };

    if (body) releaseParams.body = body;

    const createReleaseResponse = await github.repos.createRelease( releaseParams );
2019-10-22 12:24:23 -04:00
Thomas Hughes
d0222fc862
Initial commit 2019-09-20 14:55:33 -05:00