-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a CI GitHub workflow to test on all supported versions of Perl, and drop the old Travis config. Also add a release workflow and the Build.PL stuff to support GitHub releases. Require PGXN::API::Searcher v0.11.1 to ensure #23 and #26 stay fixed, and fix the CPAN meta merging to properly generate a v2 `MYMETA.json` file. Increment version to v0.20.0 and update the copyright year. Drop support for Perl 5.10. Flesh out the README a bit.
- Loading branch information
Showing
15 changed files
with
169 additions
and
40 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: 🧪 CI | ||
on: | ||
push: | ||
branches: ['*'] | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [[🐧, ubuntu], [🍎, macos]] # [🪟, windows] | ||
perl: [ '5.38', '5.36', '5.34', '5.32', '5.30', '5.28', '5.26', '5.24', '5.22', '5.20', '5.18', '5.16', '5.14', '5.12' ] | ||
name: 🧅 Perl ${{ matrix.perl }} on ${{ matrix.os[0] }} ${{ matrix.os[1] }} | ||
runs-on: ${{ matrix.os[1] }}-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Perl ${{ matrix.perl }} | ||
uses: shogo82148/actions-setup-perl@v1 | ||
with: { perl-version: "${{ matrix.perl }}" } | ||
|
||
- name: Brew CommonMark | ||
if: runner.os == 'macOS' | ||
run: | | ||
brew install cmark | ||
cpanm -v --notest --no-man-pages CommonMark --configure-args="INC=-I'$(brew --prefix)/include' LIBS=-L'$(brew --prefix)/lib -lcmark'" | ||
- name: Apt CommonMark | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get install libcmark-dev | ||
cpanm -v --notest --no-man-pages CommonMark | ||
- name: Install Dependencies | ||
run: cpanm -vn Module::Build && cpanm -vn --installdeps --with-recommends --with-develop . | ||
- name: Run Tests | ||
run: perl Build.PL ./Build && ./Build test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: 🚀 Release | ||
on: | ||
push: | ||
tags: [v*] | ||
jobs: | ||
release: | ||
name: Release on CPAN and GitHub | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Perl | ||
uses: shogo82148/actions-setup-perl@v1 | ||
- name: Install Release Dependencies | ||
run: cpanm -qn Module::Build CPAN::Uploader | ||
- name: Package the Release | ||
id: package | ||
run: perl Build.PL && ./Build manifest && ./Build dist && echo "tarball=$(./Build tarball_name )" >> $GITHUB_OUTPUT | ||
- name: Generate Release Changes | ||
run: ./Build latest_changes | ||
- name: Release on CPAN | ||
env: | ||
CPANUSER: ${{ secrets.CPAN_USERNAME }} | ||
CPANPASS: ${{ secrets.CPAN_PASSWORD }} | ||
run: cpan-upload --user "$CPANUSER" --password "$CPANPASS" '${{ steps.package.outputs.tarball }}' | ||
- name: Create GitHub Release | ||
id: release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body_path: latest_changes.md | ||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ steps.release.outputs.upload_url }} | ||
asset_path: ./${{ steps.package.outputs.tarball }} | ||
asset_name: ${{ steps.package.outputs.tarball }} | ||
asset_content_type: application/gzip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ | |
/*META.* | ||
/Build | ||
/www | ||
|
||
.vscode/ |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/local/bin/perl -w | ||
|
||
use 5.10.0; | ||
use v5.12; | ||
use utf8; | ||
use PGXN::API::Router; | ||
use Plack::Runner; | ||
|
@@ -233,7 +233,7 @@ David E. Wheeler <[email protected]> | |
=head1 Copyright and License | ||
Copyright (c) 2011-2013 David E. Wheeler. | ||
Copyright (c) 2011-2024 David E. Wheeler. | ||
This module is free software; you can redistribute it and/or modify it under | ||
the L<PostgreSQL License|http://www.opensource.org/licenses/postgresql>. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/local/bin/perl -w | ||
|
||
use 5.10.0; | ||
use v5.12; | ||
use utf8; | ||
use PGXN::API::Sync; | ||
use Getopt::Long; | ||
|
@@ -87,7 +87,7 @@ David E. Wheeler <[email protected]> | |
=head1 Copyright and License | ||
Copyright (c) 2011-2013 David E. Wheeler. | ||
Copyright (c) 2011-2024 David E. Wheeler. | ||
This module is free software; you can redistribute it and/or modify it under | ||
the L<PostgreSQL License|http://www.opensource.org/licenses/postgresql>. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
package PGXN::API; | ||
|
||
use 5.10.0; | ||
use v5.12; | ||
use utf8; | ||
use MooseX::Singleton; | ||
use File::Spec::Functions qw(catfile catdir); | ||
use URI::Template; | ||
use JSON; | ||
use namespace::autoclean; | ||
our $VERSION = v0.16.6; | ||
our $VERSION = v0.20.0; | ||
|
||
=head1 Name | ||
|
@@ -308,7 +308,7 @@ David E. Wheeler <[email protected]> | |
=head1 Copyright and License | ||
Copyright (c) 2011-2013 David E. Wheeler. | ||
Copyright (c) 2011-2024 David E. Wheeler. | ||
This module is free software; you can redistribute it and/or modify it under | ||
the L<PostgreSQL License|http://www.opensource.org/licenses/postgresql>. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package PGXN::API::Indexer; | ||
|
||
use 5.10.0; | ||
use v5.12; | ||
use utf8; | ||
use Moose; | ||
use PGXN::API; | ||
|
@@ -20,7 +20,7 @@ use Lucy::Index::Indexer; | |
use Try::Tiny; | ||
use Archive::Zip qw(AZ_OK); | ||
use namespace::autoclean; | ||
our $VERSION = v0.16.6; | ||
our $VERSION = v0.20.0; | ||
|
||
has verbose => (is => 'rw', isa => 'Int', default => 0); | ||
has _index_it => (is => 'rw', isa => 'Bool', default => 1); | ||
|
@@ -1515,7 +1515,7 @@ David E. Wheeler <[email protected]> | |
=head1 Copyright and License | ||
Copyright (c) 2011-2013 David E. Wheeler. | ||
Copyright (c) 2011-2024 David E. Wheeler. | ||
This module is free software; you can redistribute it and/or modify it under | ||
the L<PostgreSQL License|http://www.opensource.org/licenses/postgresql>. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package PGXN::API::Router; | ||
|
||
use 5.10.0; | ||
use v5.12; | ||
use utf8; | ||
use PGXN::API; | ||
use Plack::Builder; | ||
|
@@ -13,7 +13,7 @@ use Plack::Request; | |
use Encode; | ||
use File::Spec::Functions qw(catdir); | ||
use namespace::autoclean; | ||
our $VERSION = v0.16.6; | ||
our $VERSION = v0.20.0; | ||
|
||
sub app { | ||
my ($class, %params) = @_; | ||
|
@@ -226,7 +226,7 @@ David E. Wheeler <[email protected]> | |
=head1 Copyright and License | ||
Copyright (c) 2011-2013 David E. Wheeler. | ||
Copyright (c) 2011-2024 David E. Wheeler. | ||
This module is free software; you can redistribute it and/or modify it under | ||
the L<PostgreSQL License|http://www.opensource.org/licenses/postgresql>. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package PGXN::API::Sync; | ||
|
||
use 5.10.0; | ||
use v5.12; | ||
use utf8; | ||
use Moose; | ||
use PGXN::API; | ||
|
@@ -14,7 +14,7 @@ use Archive::Zip qw(:ERROR_CODES); | |
use constant WIN32 => $^O eq 'MSWin32'; | ||
use Moose::Util::TypeConstraints; | ||
use namespace::autoclean; | ||
our $VERSION = v0.16.6; | ||
our $VERSION = v0.20.0; | ||
|
||
subtype Executable => as 'Str', where { | ||
my $exe = $_; | ||
|
@@ -389,7 +389,7 @@ David E. Wheeler <[email protected]> | |
=head1 Copyright and License | ||
Copyright (c) 2011-2013 David E. Wheeler. | ||
Copyright (c) 2011-2024 David E. Wheeler. | ||
This module is free software; you can redistribute it and/or modify it under | ||
the L<PostgreSQL License|http://www.opensource.org/licenses/postgresql>. | ||
|
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