From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Matthias Aßhauer" <mha1993@live.de>
Cc: Mahdi Hosseinzadeh via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org,
Mahdi Hosseinzadeh <mdihosseinzadeh@gmail.com>
Subject: Re: [PATCH] githubci: add a workflow for creating GitHub release notes
Date: Fri, 26 Nov 2021 14:59:07 +0100 (CET) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.2111261455590.63@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <AM0PR04MB60196EFE984652ECCBD591A8A5629@AM0PR04MB6019.eurprd04.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 3300 bytes --]
Hi,
On Thu, 25 Nov 2021, Matthias Aßhauer wrote:
> On Thu, 25 Nov 2021, Mahdi Hosseinzadeh via GitGitGadget wrote:
>
> > diff --git a/.github/workflows/create-release.yml
> > b/.github/workflows/create-release.yml
> > new file mode 100644
> > index 00000000000..711ba105e42
> > --- /dev/null
> > +++ b/.github/workflows/create-release.yml
> > @@ -0,0 +1,40 @@
> > +name: Create GH release
> > +
> > +# Create a GitHub release for each new tag.
> > +# The release notes are taken from the release notes file
> > +# modified in that commit located in Documentation/RelNotes directory.
> > +
> > +on:
> > + push:
> > + tags:
> > + - v[0-9]+.*
> > [...]
>
> All in all I think this is too convoluted for what it's trying to
> achieve. I think we should be able to achieve the same result with
> something like this:
>
> .github/workflows/create-release.yml | 37 ++++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)
> create mode 100644 .github/workflows/create-release.yml
>
> diff --git a/.github/workflows/create-release.yml
> b/.github/workflows/create-release.yml
> new file mode 100644
> index 0000000000..5b9fdf0372
> --- /dev/null
> +++ b/.github/workflows/create-release.yml
> @@ -0,0 +1,37 @@
> +name: Create GH release
> +
> +# Create a GitHub release for each new tag.
> +# The release notes are taken from the release notes file
> +# modified in that commit located in Documentation/RelNotes directory.
> +
> +on:
> + push:
> + tags:
> + - v[0-9]+.[0-9]+.[0-9]+
> +
> +permissions:
> + contents: write
> +
> +jobs:
> + create-gh-release:
> + name: Create a new release or update an existing release in the GitHub
> repository
> + runs-on: ubuntu-latest
> + steps:
> + - name: Checkout the repository
> + uses: actions/checkout@v2
> + with:
> + fetch-depth: 1
> + - name: Get version number
> + shell: bash
> + run: |
> + echo GIT_VERSION=${GITHUB_REF#refs/tags/v} >> $GITHUB_ENV
> + - name: Create the release
> + uses: actions/create-release@v1
> + env:
> + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
> + with:
> + tag_name: ${{ github.ref_name }}
> + release_name: ${{ github.ref_name }}
> + body_path: Documentation/RelNotes/${{ env.GIT_VERSION }}.txt
> + draft: false
> + prerelease: false
> --
> 2.25.1
>
> An example of the result this reduced action produces can be found at [4]
> (release notes for v2.34.1, but the tagged commit isn't v2.34.1).
>
> Best regards
>
> Matthias
>
> [1] https://github.com/git/git/pull/1146
> [2] https://github.com/git/git/pull/1146#discussion_r756854259
> [3] https://github.com/git/git/pull/1146#discussion_r756845042
> [4] https://github.com/rimrul/git/releases/tag/v2.34.1
One thing I had not thought of earlier: do we really want to do this in
every fork of git/git? I know for a fact that microsoft/git has a very
different workflow upon pushing a tag.
So maybe we need something like this, too:
create-gh-release:
+ if: github.repository == 'git/git'
name: Create a new release or update an existing release in the GitHub repository
Ciao,
Dscho
next prev parent reply other threads:[~2021-11-26 14:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-25 11:36 [PATCH] githubci: add a workflow for creating GitHub release notes Mahdi Hosseinzadeh via GitGitGadget
2021-11-25 20:57 ` Matthias Aßhauer
2021-11-26 13:59 ` Johannes Schindelin [this message]
2021-11-26 17:37 ` Matthias Aßhauer
2021-11-29 12:49 ` Ævar Arnfjörð Bjarmason
2021-11-30 11:46 ` Johannes Schindelin
2021-12-02 19:05 ` Junio C Hamano
2021-12-03 8:33 ` Fabian Stelzer
2021-12-05 1:25 ` Junio C Hamano
2021-12-05 10:54 ` Fabian Stelzer
2021-12-07 0:05 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.QRO.7.76.6.2111261455590.63@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=mdihosseinzadeh@gmail.com \
--cc=mha1993@live.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).