-
Notifications
You must be signed in to change notification settings - Fork 62
/
.travis.yml
54 lines (47 loc) · 1.19 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
dist: xenial
services:
- xvfb
language: node_js
node_js: 'lts/*'
cache:
npm: false
addons:
firefox: latest
script:
- |
npm run lint
npm run test
if [[ $TRAVIS_TAG == *"beta"* ]]; then
npm run beta
else
unset WEB_EXT_API_KEY
unset WEB_EXT_API_SECRET
npm run build
fi
npm run test:functional
npm run webext:lint
npm run check:dependencies
after_success: npm run coverage
deploy:
provider: releases
prerelease: true
api_key: $GITHUB_TOKEN
file_glob: true
file: web-ext-artifacts/*
skip_cleanup: true
draft: true
name: $TRAVIS_TAG
on:
tags: true
condition: $TRAVIS_TAG =~ beta
after_deploy:
- |
if [[ $TRAVIS_TAG == *"beta"* ]]; then
git clone --depth 1 --branch beta-updates https://github.com/stoically/temporary-containers.git
cd temporary-containers
export BETA_VERSION=$(echo $TRAVIS_TAG | sed "s/^v//")
sed -i -e "s/[0-9]\+\.[0-9]\+\(beta[0-9]\+\)\?/$BETA_VERSION/g" updates.json
sed -i -e "s/-fx\\.xpi/-an\\+fx\\.xpi/" updates.json
git commit -am "$TRAVIS_TAG"
git push https://$GITHUB_TOKEN:[email protected]/stoically/temporary-containers.git/ beta-updates
fi