elderscrolls-addon-achievem.../.drone.yml

58 lines
1.3 KiB
YAML
Raw Normal View History

2019-10-23 08:00:46 +00:00
---
kind: pipeline
name: default
2019-10-23 08:12:53 +00:00
clone:
disable: true
2019-10-23 08:00:46 +00:00
steps:
2019-10-23 08:12:53 +00:00
- name: clone
image: alpine/git
commands:
2019-10-23 08:13:50 +00:00
- git clone https://git.f-brinker.de/fbrinker/elderscrolls-addon-achievementInfo.git sources
2019-10-23 08:15:03 +00:00
- cd sources && git checkout $DRONE_COMMIT
2019-10-23 08:21:37 +00:00
when:
2019-10-23 08:27:35 +00:00
event:
- tag
2019-10-23 08:00:46 +00:00
- name: build
image: alpine
commands:
2019-10-23 08:05:22 +00:00
- apk update && apk add --no-cache zip
2019-10-23 08:54:53 +00:00
# Delete unneeded files/dirs
- rm -rf sources/.git
- rm -rf sources/.drone.yml
# Set Version and AddonVersion
- export VERSION=$DRONE_TAG
2019-10-23 09:03:00 +00:00
- export ADDON_VERSION=$(echo $DRONE_TAG | sed -E 's/(0|)\.//g')
2019-10-23 08:54:53 +00:00
- 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
2019-10-23 08:32:34 +00:00
# Rename and zip
2019-10-23 08:19:46 +00:00
- mv sources AchievementInfo
- zip -r "AchievementInfo-$DRONE_TAG.zip" ./AchievementInfo
2019-10-23 08:21:37 +00:00
when:
2019-10-23 08:27:35 +00:00
event:
- tag
2019-10-23 08:00:46 +00:00
- name: release
image: plugins/gitea-release
settings:
base_url: https://git.f-brinker.de
api_key:
from_secret: gitea_token
2019-10-23 08:30:28 +00:00
files: ./*.zip
2019-10-23 08:00:46 +00:00
draft: true
2019-10-23 09:11:18 +00:00
title: AchievementInfo ${DRONE_TAG}
2019-10-23 09:12:34 +00:00
note: AchievementInfo/CHANGELOG.md
2019-10-23 09:06:23 +00:00
checksum:
- md5
- sha1
- sha256
- sha512
- adler32
- crc32
2019-10-23 08:21:37 +00:00
when:
2019-10-23 08:24:54 +00:00
event:
- tag