Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/actions/build/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and Test
runs:
using: composite
steps:
- uses: actions/checkout@v7

- name: Regular tests
shell: bash
run: |
cpanm --installdeps --notest .
perl Makefile.PL
make
make test

- name: Prepare for release tests
shell: bash
run: |
cpanm --installdep .
cpanm --notest Test::CheckManifest Test::Pod::Coverage Pod::Coverage Test::Pod

- name: Release tests
shell: bash
env:
RELEASE_TESTING: 1
run: |
perl Makefile.PL
make
make test
22 changes: 1 addition & 21 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,4 @@ jobs:

name: Perl ${{ matrix.perl-version }}
steps:
- uses: actions/checkout@v5

- name: Regular tests
run: |
cpanm --installdeps --notest .
perl Makefile.PL
make
make test

- name: Prepare for release tests
run: |
cpanm --installdep .
cpanm --notest Test::CheckManifest Test::Pod::Coverage Pod::Coverage Test::Pod

- name: Release tests
env:
RELEASE_TESTING: 1
run: |
perl Makefile.PL
make
make test
- uses: $/.github/actions/build
36 changes: 36 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
release:
types: released

jobs:
release:
name: Build and release to CPAN
runs-on: ubuntu-latest
strategy:
matrix:
perl-version:
- latest

container:
# https://hub.docker.com/r/perldocker/perl-tester
image: perldocker/perl-tester:${{ matrix.perl-version }}

steps:
- uses: $/.github/actions/build

- name: Create distribution
run: |
cpanm --installdeps --with-develop --notest .
make dist

- name: Upload to CPAN
run: |
cpanm --notest CPAN::Uploader
perl -E 'print $ENV{q(PAUSE_PASSWORD)}' \
| cpan-upload --user="$PAUSE_USERNAME" \
"Audio-Scan-$GITHUB_REF_NAME.tar.gz"
env:
PAUSE_USERNAME: ${{ secrets.pause_username }}
PAUSE_PASSWORD: ${{ secrets.pause_password }}
Loading