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

60 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2019-10-23 08:00:46 +00:00
---
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
- name: lint
image: alpine
commands:
- apk update
- apk add --no-cache build-base curl unzip
- apk add --no-cache lua5.1 lua5.1-dev luarocks5.1
- luarocks-5.1 install luacheck
- cd sources
- luacheck ./*.lua
2019-10-23 08:00:46 +00:00
- name: build
image: alpine
commands:
- apk update && apk add --no-cache zip
# Delete unneeded files/dirs
2019-10-26 22:31:50 +00:00
- rm -rf sources/.git
2020-08-25 07:56:37 +00:00
- rm -rf sources/screenshots
2019-10-26 22:31:50 +00:00
- rm -f sources/.drone.status
- rm -f sources/.drone.yml
- rm -f sources/.luacheckrc
2019-10-23 08:00:46 +00:00
# Set Version and AddonVersion
- export VERSION=$DRONE_TAG
- export ADDON_VERSION=$(echo $DRONE_TAG | sed -E 's/(0|)\.//g')
2019-10-26 20:15:38 +00:00
- sed -i "s/0.123456789/$VERSION/g" sources/AchievementInfoCommon.lua
- sed -i "s/0.123456789/$VERSION/g" sources/AchievementInfo.txt
- sed -i "s/0.123456789/$ADDON_VERSION/g" sources/AchievementInfo.txt
2019-10-23 08:00:46 +00:00
# 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