elderscrolls-addon-achievem.../.drone.yml
Florian Brinker f1c152b2ff
已通過所有檢查
continuous-integration/drone/push Build is passing
Remove Checksums
2019-10-23 12:49:35 +02:00

50 行
1.2 KiB
YAML

---
kind: pipeline
name: default
clone:
disable: true
steps:
- name: clone
image: alpine/git
commands:
- git clone https://git.f-brinker.de/fbrinker/elderscrolls-addon-achievementInfo.git sources
- cd sources && git checkout $DRONE_COMMIT
when:
event:
- tag
- name: build
image: alpine
commands:
- apk update && apk add --no-cache zip
# Delete unneeded files/dirs
- rm -rf sources/.git
- rm -rf sources/.drone.yml
# Set Version and AddonVersion
- export VERSION=$DRONE_TAG
- export ADDON_VERSION=$(echo $DRONE_TAG | sed -E 's/(0|)\.//g')
- sed -i "s/%VERSION%/$VERSION/g" sources/AchievementInfoCommon.lua
- sed -i "s/%VERSION%/$VERSION/g" sources/AchievementInfo.txt
- sed -i "s/%ADDON_VERSION%/$ADDON_VERSION/g" sources/AchievementInfo.txt
# Rename and zip
- mv sources AchievementInfo
- zip -r "AchievementInfo-$DRONE_TAG.zip" ./AchievementInfo
when:
event:
- tag
- name: release
image: plugins/gitea-release
settings:
base_url: https://git.f-brinker.de
api_key:
from_secret: gitea_token
files: ./*.zip
title: AchievementInfo ${DRONE_TAG}
note: AchievementInfo/CHANGELOG.md
when:
event:
- tag