update build

This commit is contained in:
peter
2019-08-19 15:35:36 +02:00
parent b33f900806
commit 5d4a7a2aad
6 changed files with 213 additions and 29 deletions
+16 -18
View File
@@ -37,25 +37,23 @@ steps:
commands:
- echo ${DRONE_BUILD_CREATED}
- name: archive plugin files
image: alpine:3.9
- name: deploy static files
image: node:12
commands:
- apk add --no-cache zip
- zip -9r ./plugin.zip *.js
when:
event:
- tag
- name: release plugin archive
image: plugins/gitea-release
settings:
base_url: https://gitea.frontblock.me
api_key:
from_secret: release_token
files:
- plugin.zip
checksum:
- md5
- git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}"
- git config --global user.name "${DRONE_COMMIT_AUTHOR}"
- git clone https://gitea.frontblock.me/fb-dist/${DRONE_REPO_NAME}.git
- cp -r ./lib/* ./${DRONE_REPO_NAME}
- cd ./${DRONE_REPO_NAME}
- git add -A
- git commit -m "drone taged as version ${DRONE_TAG}"
- git tag ${DRONE_TAG}
- git push https://$GIT_USER:$GIT_PASSWORD@gitea.frontblock.me/fb-dist/${DRONE_REPO_NAME}.git master ${DRONE_TAG}
environment:
GIT_USER:
from_secret: git_user
GIT_PASSWORD:
from_secret: git_password
when:
event:
- tag