Skip to content

Commit

Permalink
feat: build with travis
Browse files Browse the repository at this point in the history
  • Loading branch information
dessant committed May 24, 2019
1 parent 05f4aea commit 01ff7fe
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:10.15.3-stretch

RUN set -ex \
&& apt-get update && apt-get install -y build-essential rename \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*

WORKDIR /app

COPY build.sh /cont/script/
RUN set -ex \
&& chmod +x /cont/script/build.sh

CMD ["/cont/script/build.sh"]
11 changes: 11 additions & 0 deletions .ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e

yarn

if [ -n "${TRAVIS_TAG}" ]; then
yarn build:prod:zip:all
rename 's|artifacts/(.*)/(.*)\.zip$|artifacts/$1/$2-$1\.zip|' artifacts/*/*.zip
else
yarn build:all
fi
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
package.json
.travis.yml
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
jobs:
fast_finish: true
include:
- stage: build
install: docker build --tag ci .ci
script: docker run --init --rm -e TRAVIS_TAG --mount type=bind,source="${PWD}",target=/app ci
os: linux
dist: xenial
language: generic
services:
- docker

before_deploy: sha256sum artifacts/*/*

deploy:
provider: releases
api_key:
secure: "aZpk5Bg6h3g6iFjfafbfHmhGRN15/5P8UaU5IxJz89y3zbHIQINfey1DSX7Uj6WhNIrPjj4AmamIa0NnuGM/8JcJ7GXIAYbFrvmSOnSW3gdujvANunPC/Im+EMpwHhzBC5cbsCm3SLOru1TNK8BasxK3Pfu4rABTxEahXMDTpkzEkrvbyhAa2O3xWzv2YSb/DKPdhlEslG+5WNLTGAi2ZtZ4XwmKRN83Uwvv0hyyX0enW/+6yPR9hUNGdgeZ6TLXUl+iaMad590KbIMbWs3InRREdPI6RA/xrwc+95r/fgs0gqsTKK+UyCD2yGh9hGr/RIb5EbxQyiKLQ+k4LytR2DbVmEUoV1Gkv0M3PjWMV5s5oI2nFElVXhC2WFBw+cJtDhZ4xsZAleO5mk0sa0auRAEsYWIwLOYaURE0Xrozg1jvcD05dKKWGIxYXqCoVE39presxGVcbP4XBhgTMXumFoJRpjBM9kjXa0f9EUaIwEej0yULzfKpW8ld3Zu3JXm4jSv9ruok/6dwj5sLOWKghue3ccLXW+rfdpbFAwbRMSQVkTK+DRsvD8r8UR2G0YFvJBZp65xY4QVkisMC59t/E5UOVSaWXp+eNN3uYLofDKq+ZyU/SmEWH63BN24kyQzrREZtBZYG3GX/4BwkC6F7pC3knGSyPxvTNJVq6i3IZiU="
draft: true
file: artifacts/*/*
file_glob: true
overwrite: true
skip_cleanup: true
body: 'Download and install the extension from the [extension store](https://github.com/dessant/ping-blocker#readme) of your browser.<br>Learn more about this release from the [changelog](https://github.com/dessant/ping-blocker/blob/master/CHANGELOG.md#changelog).<br><br>The assets listed below are not for general use.'
on:
tags: true

0 comments on commit 01ff7fe

Please sign in to comment.