WARNING: This github action is very young, use at your own risks 😀
This action upload your distribution to CPAN
It requires that you generated the dist to have a My-Distribution-0.01.tar.gz
lying around 😀
Set your credentials as github secrets and give them to with
, they won't be printed during the whole process (they are "secret" after all! 😄)
Required The name of the PAUSE account to use.
Required The password of the PAUSE account to use.
uses: actions/action-upload-to-cpan@master
with:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
For an ExtUtils::MakeMaker
module, you can then write a .github/workflows/build-and-action.yml
like this:
on: [push]
jobs:
build-and-release:
runs-on: ubuntu-latest
name: Build and release to CPAN
steps:
- uses: actions/checkout@v2
- name: Configure
run: perl Makefile.PL
- name: Build
run: make
- name: Deliver locally
run: make dist
- name: Upload to CPAN
id: upload
uses: thibaultduponchelle/action-upload-to-cpan@master
with:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
This github actions is based on cpan-upload and will produce this kind of logs if the upload is a success:
registering upload with PAUSE web server
POSTing upload for Acme-Automatix-0.02.tar.gz to https://pause.perl.org/pause/authenquery?ACTION=add_uri
PAUSE add message sent ok [200]
You will get this message if your user/password are not correct:
registering upload with PAUSE web server
POSTing upload for Acme-Automatix-0.01.tar.gz to https://pause.perl.org/pause/authenquery?ACTION=add_uri
Upload failed (request failed with error code 401
Message: Unauthorized
), will make attempt #1 ...
You will get this message if your distribution already exists with the same version:
Failed to upload and reached maximum retry count!
registering upload with PAUSE web server
POSTing upload for Acme-Automatix-0.11.tar.gz to https://pause.perl.org/pause/authenquery?ACTION=add_uri
Upload failed (request failed with error code 409
Message: Conflict
)