Config flexibility #215
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Server CI | |
on: | |
push: | |
branches: [master] | |
tags: '**' | |
paths: | |
- 'server/**' | |
- '.github/workflows/server.yml' | |
pull_request: | |
branches: [master] | |
paths: | |
- 'server/**' | |
- '.github/workflows/server.yml' | |
workflow_dispatch: | |
defaults: | |
run: | |
working-directory: 'server' | |
jobs: | |
build_test_deploy: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ['ubuntu-latest', 'macos-latest'] | |
perl: ['5.40', '5.38', '5.36', '5.34', '5.32', '5.30', '5.28', '5.26'] | |
name: Perl ${{ matrix.perl }} on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shogo82148/[email protected] | |
with: | |
perl-version: ${{ matrix.perl }} | |
install-modules-with: cpanm | |
install-modules: CPAN::Uploader | |
working-directory: server | |
- name: Create Makefile | |
run: perl Makefile.PL | |
- name: Make module | |
run: make | |
- name: Run tests | |
run: make test | |
- name: Build distribution | |
run: make dist | |
- name: Publish to CPAN | |
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' && matrix.perl == '5.40' }} | |
run: cpan-upload -u mreisner -p '${{ secrets.PAUSE_PASSWORD }}' PLS*.tar.gz |