Carbon/.drone.yml
a 9c7497406b
All checks were successful
continuous-integration/drone/push Build is passing
Fix drone failing on pr
2020-10-20 11:56:11 +02:00

35 lines
861 B
YAML

kind: pipeline
type: docker
name: default
steps:
- name: build
image: node:current-alpine3.12
commands:
- npm install -D
- npm run rebuild
- name: package
image: fuww/alpine-zip
commands:
- SHORTREV=`echo $DRONE_COMMIT | cut -b 1-8`
- echo FILENAME=`date +%Y%m%d%H%m`-$SHORTREV.zip >> environment
- source environment
- zip -r $FILENAME build
- name: b2
image: tianon/backblaze-b2:2
when:
event:
- push
environment:
BUCKET: carbon-artifacts
ACCOUNT:
from_secret: b2_account_id
KEY:
from_secret: b2_application_key
commands:
- source environment
- b2 authorize-account $ACCOUNT $KEY
- b2 upload-file $BUCKET $FILENAME $FILENAME
- echo Build artifacts avaliable at `b2 make-friendly-url $BUCKET $FILENAME`