Dist::Zilla::Role::Author::CSSON::GithubActions - Role for Github Actions workflows


Version 0.0107, released 2020-12-30.


In dist.ini:

    ; set on.push.branches to an empty list
    clear_on_push_branches = 1

    ; set on.pull_request.branches to an empty list
    clear_on_pull_request_branches = 1

    ; add branches to on.push.branches
    on_pull_request_branches = 'this-branch'
    on_pull_request_branches = 'that-other-branch'

    ; add branches to on.pull_request.branches
    on_pull_request_branches = 'my-pr-branch'
    on_pull_request_branches = 'feature-branch'

    ; replace jobs.perl-job.strategy.matrix.os
    matrix_os = ubuntu-latest
    matrix_os = ubuntu-16.04

    ; replace jobs.perl-job.strategy.matrix.perl-version
    perl_version = 5.32
    perl_version = 5.24
    perl_version = 5.18


This role exposes some parameters creates a Github Actions workflow file in .github/workflows.

Note that, if you plan to use the customizations shown above, the following settings in the workflow YAML file are expected to be defined as lists and not strings:

  • on.push.branches

  • on.pull_request.branches

  • jobs.perl-job.strategy.matrix.os

  • jobs.perl-job.strategy.matrix.perl-version

Also, it is assumed that the step where the distribution is tested is named perl-job.

The generated workflow file will be created in .github/workflows. The filename will be (in order of priority):

  • The value of the filename parameter in dist.ini

  • The value of the filename key in the $workflow.yml file

  • The name of the $workflow.yml file

See Dist::Zilla::Plugin::Author::CSSON::GithubActions::Workflow::TestWithMakefile for an example workflow.




Erik Carlsson <>


This software is copyright (c) 2020 by Erik Carlsson.

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