Dist-Zilla-Plugin-GitHub-CreateRelease

 view release on metacpan or  search on metacpan

bin/createrelease.pl  view on Meta::CPAN

 notes_from = ChangeLog          ; default = SignReleaseNotes
 notes_file = Changes            ; default = Release-VERSION
 github_notes = 0                ; default = 0 (false)
 hash_alg = sha256               ; default = sha256
 add_checksum = 1                ; default = 1 (true)
 org_id = some_id_identifier     ; default = github
 title_template = Version RELEASE - TRIAL CPAN release      ; this is the default

The settings have the same meaning as the attributes of the same name
documented in L<Dist::Zilla::Plugin::GitHub::CreateRelease>.  Only the
settings listed above, plus C<repo>, C<remote_name>, C<draft>, C<trial> and
C<sign>, are recognised by this script; any other setting in the section
causes it to fail on startup.

The C<draft> and C<trial> settings are always overridden by the command line
- use C<--no-draft> and C<--trial> to control them.

If a file named F<.githubcreaterelease> exists in the current directory it is
used as the configuration file in preference to the file given by
C<--configfile>.  This allows the settings to be kept separate from
F<dist.ini> - for example for a distribution that is not built with
Dist::Zilla.

=head1 RELEASE NOTES

The C<notes_from> setting determines where the body of the GitHub Release
comes from:

=over

=item SignReleaseNotes

Read from the file named by C<notes_file>, with C<VERSION> in the name
replaced by the version of the release.  The file is used as-is, since the
notes generated by L<Dist::Zilla::Plugin::SignReleaseNotes> already contain
the checksum of the archive.

=item FromFile

As above, but the checksum of the CPAN archive is appended when
C<add_checksum> is true.

=item ChangeLog

Read the entry for the release from the change log named by C<notes_file>
using L<CPAN::Changes>.  The checksum of the CPAN archive is appended when
C<add_checksum> is true.

=item GitHub::CreateRelease

Use only the checksum of the CPAN archive as the notes.

=back

When C<notes_as_code> is true the notes are wrapped in a GitHub markdown
code fence.

=head1 GITHUB API AUTHENTICATION

The script uses L<Config::Identity::GitHub> to obtain the GitHub API
credentials, and requires a file in your home directory named
F<.github-identity> containing:

 login github_username OR github_organization
 token github_....

The token must be a Personal Access Token with at least "Write" access to
"Contents" for the repository.  The C<org_id> setting selects a different
identity file, so that C<org_id = project> reads F<~/.project-identity> or
F<~/.project> instead.

An encrypted (F<.github-identity.asc>) identity file is supported and
recommended.  See L<Dist::Zilla::Plugin::GitHub::CreateRelease/"GITHUB API
AUTHENTICATION"> for the full details.

=head1 CAVEATS

Unless C<--version> is given, the version is taken from the git tag sorted by
tag date, so the tag for the release being published must be the most recently
created tag in the repository.  Use C<--version> to publish a release for any
older tag.

The owner of the repository is taken from the C<login> of the identity file,
so a repository owned by another user or organization needs an C<org_id>
identity whose login is that owner.

=head1 SEE ALSO

L<Dist::Zilla::Plugin::GitHub::CreateRelease>

L<Dist::Zilla::Plugin::SignReleaseNotes>

L<Config::Identity::GitHub>

=head1 AUTHOR

Timothy Legge

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Timothy Legge.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut



( run in 2.220 seconds using v1.01-cache-2.11-cpan-007c89162af )