scanclient-live/.drone.yml

97 lines
2.2 KiB
YAML

---
kind: secret
name: gitea_token
get:
path: odit-git-bot
name: apikey
---
kind: secret
name: git_ssh
get:
path: odit-git-bot
name: sshkey
---
kind: pipeline
type: kubernetes
name: build:tag
steps:
- name: build
image: node:15.11.0-alpine3.13
commands:
- apk add squashfs-tools git zip
- yarn
- yarn download
- unsquashfs slax/modules/lfkscan.sb
- rm -rf slax/modules/lfkscan.sb squashfs-root/root/lfkscan
- mv out/\@lfk-scanclient-electron-linux-x64 squashfs-root/root/lfkscan
- chmod -R 777 squashfs-root/root/lfkscan
- mksquashfs squashfs-root slax/modules/lfkscan.sb -b 1024k -comp xz -Xbcj x86 -e boot
- rm -rf squashfs-root out electron.zip
- mkdir dist
- zip -r dist/lfk-scanclient-live_${CI_COMMIT_TAG}_x64.zip slax
- name: gitea_release
image: plugins/gitea-release
settings:
title: Release ${CI_COMMIT_TAG}
api_key:
from_secret: gitea_token
base_url: https://git.odit.services
files: dist/*
checksum:
- md5
- sha1
- sha256
- sha512
- adler32
- crc32
trigger:
event:
- tag
---
kind: pipeline
type: kubernetes
name: prepare:tag
steps:
- name: bump package version
image: node:alpine
commands:
- npm --no-git-tag-version version ${SOURCE_TAG}
- name: push new version to repo
image: appleboy/drone-git-push
settings:
commit: true
commit_message: 🚀New package version ${SOURCE_TAG} [CI SKIP]
author_email: bot@odit.services
followtags: false
branch: main
remote: git@git.odit.services:lfk/scanclient-live.git
skip_verify: true
ssh_key:
from_secret: git_ssh
- name: tag
image: alpine/git
commands:
- git tag ${SOURCE_TAG} -a -m "Release ${SOURCE_TAG}"
- name: push to repo
image: appleboy/drone-git-push
settings:
commit: false
author_email: bot@odit.services
followtags: true
branch: main
remote: git@git.odit.services:lfk/scanclient-live.git
skip_verify: true
ssh_key:
from_secret: git_ssh
trigger:
event:
exclude:
- push
- tag
include:
- custom