You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
unblock-music-web/.drone.yml

68 lines
1.4 KiB
YAML

5 years ago
---
kind: pipeline
type: docker
name: default
clone:
depth: 1
steps:
- name: installDependencies
image: node:lts
commands:
5 years ago
- npm ci --verbose --registry=https://registry.npm.taobao.org
5 years ago
- name: build
image: node:lts
commands:
- npm run fix-compatibility
5 years ago
- npm run build
5 years ago
- tar -czf legacy.tar.gz -C ./dist .
- npm run build -- --modern
5 years ago
- tar -czf morden.tar.gz -C ./dist .
5 years ago
5 years ago
- name: release
image: plugins/gitea-release
settings:
base_url: https://git.ixarea.com
files:
5 years ago
- morden.tar.gz
- legacy.tar.gz
5 years ago
api_key:
from_secret: gitea_token
checksum:
- sha256
when:
event: [tag]
- 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/**/*
5 years ago
exclude:
- "**/*.map"
5 years ago
strip_prefix: dist/
target: /public
path_style: true
endpoint: https://fs.sz2.ixarea.com
5 years ago
- 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