Pre-flight checks
action-gh-release version
v2
Runner operating system
ubuntu-latest
Release target repository
No response
Reproduction repo, gist, or artifact
No response
Workflow snippet
Run softprops/action-gh-release@v2
with:
name: 1.0.0
body: Version 1.0.0 of the ecommerce application.
draft: false
fail_on_unmatched_files: true
generate_release_notes: true
prerelease: false
overwrite_files: true
token: ***
env:
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
VERSION: 1.0.0
Expected behavior
Given the following input:
Run softprops/action-gh-release@v2
with:
name: 1.0.0
body: Version 1.0.0 of the ecommerce application.
draft: false
files: ***
fail_on_unmatched_files: true
generate_release_notes: true
prerelease: false
overwrite_files: true
token: ***
env:
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
VERSION: 1.0.0
I expect to get a release with name 1.0.0 and body Version 1.0.0 of the ecommerce application.
Actual behavior
Given the following input:
Run softprops/action-gh-release@v2
with:
name: 1.0.0
body: Version 1.0.0 of the ecommerce application.
draft: false
files: ***
fail_on_unmatched_files: true
generate_release_notes: true
prerelease: false
overwrite_files: true
token: ***
env:
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
VERSION: 1.0.0
I'm getting a release with name v1.0.0 (the original name with the tag) and body Version of the ecommerce application.
Steps to reproduce
- Create the following workflow:
name: Deliver Application
on:
push:
tags:
- 'v*.*.*'
jobs:
substring-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.substring.outputs.substring }}
steps:
- name: Substring version
id: substring
uses: bhowell2/github-substring-action@1.0.2
with:
value: ${{ github.event_name == 'push' && github.ref_name || github.event.inputs.version }}
index_of_str: v
release-application:
runs-on: ubuntu-latest
needs: substring-version
permissions:
contents: write
steps:
- run: echo "VERSION=${{ needs.substring-version.outputs.version }}" >> $GITHUB_ENV
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
env:
VERSION: ${{ needs.substring-version.outputs.version }}
with:
name: ${{ env.VERSION }}
body: Version ${{ env.VERSION }} of the ecommerce application.
draft: false
generate_release_notes: true
prerelease: false
- Push a tag named v1.0.0
- You will see that the
- run: echo "VERSION=${{ needs.substring-version.outputs.version }}" >> $GITHUB_ENV step prints 1.0.0, but the action creates the release with the original name of the tag, and the body includes an empty space instead of the cut name of the tag
Relevant logs
👩🏭 Creating new GitHub release for tag v1.0.0...
↪️ Using release 296439299 for tag v1.0.0 instead of duplicate draft 297279970
🧹 Removing duplicate draft release 297279970 for tag v1.0.0...
Finalizing release...
Getting assets list...
🎉 Release ready at ***
Additional context
No response
Pre-flight checks
masteraction-gh-release version
v2
Runner operating system
ubuntu-latest
Release target repository
No response
Reproduction repo, gist, or artifact
No response
Workflow snippet
Expected behavior
Given the following input:
Run softprops/action-gh-release@v2
with:
name: 1.0.0
body: Version 1.0.0 of the ecommerce application.
draft: false
files: ***
fail_on_unmatched_files: true
generate_release_notes: true
prerelease: false
overwrite_files: true
token: ***
env:
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
VERSION: 1.0.0
I expect to get a release with name
1.0.0and bodyVersion 1.0.0 of the ecommerce application.Actual behavior
Given the following input:
Run softprops/action-gh-release@v2
with:
name: 1.0.0
body: Version 1.0.0 of the ecommerce application.
draft: false
files: ***
fail_on_unmatched_files: true
generate_release_notes: true
prerelease: false
overwrite_files: true
token: ***
env:
PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
VERSION: 1.0.0
I'm getting a release with name
v1.0.0(the original name with the tag) and bodyVersion of the ecommerce application.Steps to reproduce
- run: echo "VERSION=${{ needs.substring-version.outputs.version }}" >> $GITHUB_ENVstep prints 1.0.0, but the action creates the release with the original name of the tag, and the body includes an empty space instead of the cut name of the tagRelevant logs
Additional context
No response