The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

VERSION

Version 0.0107, released 2020-12-30.

SYNOPSIS

In dist.ini:

    [MyWorkflow]
    ; 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

DESCRIPTION

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.

SOURCE

https://github.com/Csson/p5-Dist-Zilla-Plugin-Author-CSSON-GithubActions

HOMEPAGE

https://metacpan.org/release/Dist-Zilla-Plugin-Author-CSSON-GithubActions

AUTHOR

Erik Carlsson <info@code301.com>

COPYRIGHT AND LICENSE

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.