Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How do you make a major or minor release draft that includes many PR?#1367

Answeredbyjetersen
arashi-dev asked this question inQ&A
Discussion options

Currently, I am not using this project but I may use it in my next project. And I have a question

I see many release drafts in this repo that have many PR names inside of them. how is that possible? what is the logic behind it?

You must be logged in to vote

You need to use the config file and input parameters to solve your use case. Please check the readme for configuration options and input options

Replies: 2 comments 3 replies

Comment options

Oh, my bad,
I thought this project also bumps the app version automatically based on the PR. but it doesn't, right? this repo, creates release drafts when the version of package.json is bumped, and it will include all the changes (PRs) between the last version and the current version, yes?

You must be logged in to vote
0 replies
Comment options

Here is a YouTube video that explains most of release drafter.
https://www.youtube.com/watch?v=EBmcx_gAts8

What you are looking for is to combine multiple actions to solve your need.
Take a look at the workflows in many of the repos that use release-drafter or look at our workflows:

https://github.com/release-drafter/release-drafter/blob/master/.github/workflows/release.yml
That workflow is based on us doing ayarn version minor which does a git push based on the npmpostversion scripts

This search find users of release drafter:https://github.com/search?q=release-drafter%2Frelease-drafter%20path%3A.github%2Fworkflows&type=code

You must be logged in to vote
3 replies
@arashi-dev
Comment options

Thank you for your response. I used it in my project and it's working now!

But there is an issue! I have bothdraft.yml andrelease.yml files in the workflows directory (copied from this repo and removed extra steps insiderelease.yml).
the issue is that when I bump the version usingpnpm version prerelease, the release draft gets published but its title isunstaged-xxx with the same tag name. I also saw the related issues on this repo but I couldn't find how to solve it.

here are my configs:

.github/workflows/draft.yml
name:Release Drafteron:push:branches:      -mainjobs:update_release_draft:permissions:contents:writepull-requests:writeruns-on:ubuntu-lateststeps:      -uses:release-drafter/release-drafter@masterenv:GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}with:commitish:main
.github/workflows/release.yml
name:Releaseon:push:tags:      -v*.*.*env:HUSKY:"0"jobs:build:permissions:contents:writepull-requests:writeruns-on:ubuntu-lateststeps:      -name:Checkoutuses:actions/checkout@v3with:fetch-depth:0      -name:versionid:versionrun:|          tag=${GITHUB_REF/refs\/tags\//}          version=${tag#v}          echo "version=${version}" >> $GITHUB_OUTPUT      -uses:release-drafter/release-drafter@masterwith:version:${{ steps.version.outputs.version }}publish:trueenv:GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}
package.json
"version":"0.0.1-pre-alpha.13","scripts": {"postversion":"git push && git push --tags"}

the file.github/release-drafter.yml is the same as this repo

and here is what I do:

  1. create a new branch and commit some changes
  2. make a PR and merge it
  3. pull the changes frommain and runpnpm version prerelease
@jetersen
Comment options

You need to use the config file and input parameters to solve your use case. Please check the readme for configuration options and input options

Answer selected byarashi-dev
@arashi-dev
Comment options

Fixed it! As you said, I had to addtag andname options in therelease.yml

with:name:v${{ steps.version.outputs.version }}tag:v${{ steps.version.outputs.version }}version:${{ steps.version.outputs.version }}publish:true

thanks for the help and the project :)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@arashi-dev@jetersen

[8]ページ先頭

©2009-2025 Movatter.jp