Automatically publish a kaleidoscope bundle on every commit for Arduino users who want to live on the bleading edge

f/automatic-build-nightly
Jesse Vincent 4 years ago
parent e6dd184d92
commit ff86fe1ed9
No known key found for this signature in database
GPG Key ID: 122F5DF7108E4046

@ -50,3 +50,15 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: make setup - run: make setup
- run: make find-filename-conflicts - run: make find-filename-conflicts
publish-arduino-package-on-every-commit:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: webfactory/ssh-agent@v0.4.1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY_DEPLOY }}
- run: git config --global user.email "nobody@keyboard.io"
- run: git config --global user.name "Automated release publisher"
- run: make setup
- run: make build-arduino-nightly-package

@ -115,7 +115,7 @@ build-arduino-nightly-package:
perl bin/build-arduino-package \ perl bin/build-arduino-package \
--kaleidoscope-tag=master \ --kaleidoscope-tag=master \
--version `date +%Y.%m.%d%H%M%S` \ --version `date +%Y.%m.%d%H%M%S` \
--index-filename-slug=kaleidoscope_nightly \ --index-filename-slug=kaleidoscope_master \
--only-one-platform-revision \ --only-one-platform-revision \
--push \ --push \
--output-repo=https://github.com/keyboardio/arduino-kaleidoscope-nightly --output-repo=ssh://git@github.com/keyboardio/arduino-kaleidoscope-master

@ -13,7 +13,7 @@ use warnings;
use strict; use strict;
use File::Temp qw/tempdir/; use File::Temp qw/tempdir/;
use Cwd qw/abs_path cwd/; use Cwd qw/abs_path cwd/;
use JSON; use JSON::PP;
use Getopt::Long; use Getopt::Long;
my $sha256 = 0; my $sha256 = 0;
@ -53,10 +53,9 @@ my $checkout_dir = "Kaleidoscope-$tag-$version";
my $filename = $checkout_dir . ".tar.bz2"; my $filename = $checkout_dir . ".tar.bz2";
my $build_base_url = $boards_repo."/master/builds/"; my $build_base_url = $boards_repo."/master/builds/";
$build_base_url =~ s/github.com/raw.githubusercontent.com/; $build_base_url =~ s|ssh://git\@github.com|https://raw.githubusercontent.com|;
my @bundle_dirs_to_remove = qw|toolchain etc doc avr/build-tools avr/bootloaders/*/lufa avr/libraries/Kaleidoscope/testing avr/libraries/Kaleidoscope/tests avr/libraries/Kaleidoscope/docs|;
my @bundle_dirs_to_remove = qw|toolchain etc doc avr/build-tools|;
chdir($temp_dir); chdir($temp_dir);
@ -127,11 +126,11 @@ my $platform_template = {
} }
}; };
my $json = JSON->new->allow_nonref; my $json = JSON::PP->new->allow_nonref;
local $/; local $/;
open( my $fh, '<', 'boardsmanager/'.$index_filename) || die "Could not open boardsmanager/$index_filename $!"; open( my $fh, '<', 'boardsmanager/'.$index_filename) || die "Could not open boardsmanager/$index_filename $!";
my $json_text = <$fh>; my $json_text = <$fh>;
my $data = from_json($json_text); my $data = decode_json($json_text);
if ($only_latest_platform) { if ($only_latest_platform) {
@{ $data->{'packages'}->[0]->{'platforms'} } = ( $platform_template); @{ $data->{'packages'}->[0]->{'platforms'} } = ( $platform_template);
} else { } else {

Loading…
Cancel
Save