web/.drone.yml

66 lines
1.3 KiB
YAML
Raw Normal View History

2019-11-10 09:25:01 +00:00
---
kind: pipeline
type: docker
name: default
clone:
depth: 1
steps:
- name: installDependencies
image: node:lts
commands:
2020-04-08 14:49:57 +00:00
- npm ci --registry=https://registry.npm.taobao.org
2019-11-10 09:25:01 +00:00
- name: build
image: node:lts
commands:
2020-03-04 00:43:23 +00:00
- npm run fix-compatibility
2020-01-21 11:35:10 +00:00
- npm run build
2020-01-31 06:22:55 +00:00
- tar -czf legacy.tar.gz -C ./dist .
2019-12-07 06:32:28 +00:00
- npm run build -- --modern
2020-01-31 06:22:55 +00:00
- tar -czf morden.tar.gz -C ./dist .
2020-01-21 11:35:10 +00:00
2019-11-10 09:25:01 +00:00
- name: release
image: plugins/gitea-release
settings:
base_url: https://git.ixarea.com
files:
2020-01-21 11:35:10 +00:00
- morden.tar.gz
- legacy.tar.gz
2019-11-10 09:25:01 +00:00
api_key:
from_secret: gitea_token
checksum:
- sha256
when:
event: [tag]
2019-11-10 10:41:35 +00:00
- name: deploy
image: plugins/s3
settings:
bucket: unlock-music
access_key:
from_secret: aws_access_key_id
secret_key:
from_secret: aws_secret_access_key
source: dist/**/*
2020-01-31 06:22:55 +00:00
strip_prefix: dist/
target: /public
2019-11-10 10:41:35 +00:00
path_style: true
endpoint: https://fs.sz2.ixarea.com
2020-01-31 06:22:55 +00:00
- name: upload
image: plugins/s3
settings:
bucket: unlock-music
access_key:
from_secret: aws_access_key_id
secret_key:
from_secret: aws_secret_access_key
source: ./*.tar.gz
target: /build/${DRONE_BUILD_NUMBER}
path_style: true
endpoint: https://fs.sz2.ixarea.com