Skip to content

Build first iteration of action-publish-cpan #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #27
mattwynne opened this issue Aug 12, 2022 · 11 comments · Fixed by #2
Closed
Tracked by #27

Build first iteration of action-publish-cpan #1

mattwynne opened this issue Aug 12, 2022 · 11 comments · Fixed by #2
Assignees

Comments

@mattwynne
Copy link
Member

🤔 What's the problem you're trying to solve?

We need this github action so that we can add a release-cpan.yml to cucumber/messages#27

✨ What's your proposed solution?

Port the code over from https://github.com/cucumber/common/blob/main/.templates/perl/default.mk

Ideally, add a test package and a github workflow to this repo to test that it actually works. See the npm action for an example.

📚 Any additional context?

cucumber/common#2029


This text was originally generated from a template, then edited by hand. You can modify the template here.

@mattwynne
Copy link
Member Author

@ehuelsmann can you help?

@mattwynne
Copy link
Member Author

Note that CPAN uses a .pause file to authenticate, so we'll probably need to write this file from a secret.

@mattwynne mattwynne moved this from Todo to In Progress in Split up the monorepo Aug 16, 2022
@mattwynne mattwynne self-assigned this Aug 16, 2022
@mattwynne
Copy link
Member Author

@ehuelsmann I've got somewhere, but it's currently failing to find the dzil binary in the PATH on the GitHub Action container. How do we find out where cpanm has installed it?

@mattwynne
Copy link
Member Author

I figured out the path thing, by installing perl ourselves but now it's giving an error when we run dzil build:

Attribute (_version_override) does not pass the type constraint because: $version is not a valid lax version string at constructor Dist::Zilla::Dist::Builder::new (defined at /usr/local/share/perl/5.30.0/Dist/Zilla/Dist/Builder.pm line 888) line 102

@mattwynne
Copy link
Member Author

OK I figured that out too. If you want to use a semver-style version number you need to prefix it with a v

@mattwynne
Copy link
Member Author

mattwynne commented Aug 16, 2022

Nope, that didn't work. I can only seem to make the dzil we get on the GitHub Actions container accept a "numeric" version like 0.003. It works fine on my local machine.

@mattwynne
Copy link
Member Author

In order to try and work out why it was different on my machine, I added some version number printing.

The GHA container has perl v5.30.0, wheras I have v5.34.0 locally.

They both end up with dzil 6.025 though.

@ehuelsmann
Copy link
Contributor

dzil is compatible with any Perl 5.20.0 or up; so the version difference shouldn't be a problem.

@mattwynne
Copy link
Member Author

I've modified it to use the same mechanism we use in the monorepo, leaning on [Hook::VersionProvider] to read the version in from a VERSION file. That seems to be working. I think I'm almost there!

@mattwynne
Copy link
Member Author

I wish I'd done this in a branch now, rather than cluttering up main

@mattwynne mattwynne mentioned this issue Aug 16, 2022
7 tasks
@mattwynne
Copy link
Member Author

OK I reset the main branch back to the beginning and you can now follow along in #2

Repository owner moved this from In Progress to Done in Split up the monorepo Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants