1 workflow to rule them all
This commit is contained in:
parent
ea573dbd0e
commit
51001fbef1
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"url": "https://drone.f-brinker.de/fbrinker/elderscrolls-addon-achievementInfo/"
|
|
||||||
}
|
|
59
.drone.yml
59
.drone.yml
@ -1,59 +0,0 @@
|
|||||||
---
|
|
||||||
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
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: alpine
|
|
||||||
commands:
|
|
||||||
- apk update && apk add --no-cache zip
|
|
||||||
# Delete unneeded files/dirs
|
|
||||||
- rm -rf sources/.git
|
|
||||||
- rm -rf sources/screenshots
|
|
||||||
- rm -f sources/.drone.status
|
|
||||||
- rm -f sources/.drone.yml
|
|
||||||
- rm -f sources/.luacheckrc
|
|
||||||
# Set Version and AddonVersion
|
|
||||||
- export VERSION=$DRONE_TAG
|
|
||||||
- export ADDON_VERSION=$(echo $DRONE_TAG | sed -E 's/(0|)\.//g')
|
|
||||||
- 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
|
|
||||||
# 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
|
|
@ -14,7 +14,7 @@ jobs:
|
|||||||
|
|
||||||
Release:
|
Release:
|
||||||
needs: [Linting]
|
needs: [Linting]
|
||||||
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/') }} # only for tags
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
Version: ${{ gitea.ref_name }}
|
Version: ${{ gitea.ref_name }}
|
||||||
@ -28,8 +28,6 @@ jobs:
|
|||||||
rm -rf sources/.git
|
rm -rf sources/.git
|
||||||
rm -rf sources/.gitea
|
rm -rf sources/.gitea
|
||||||
rm -rf sources/screenshots
|
rm -rf sources/screenshots
|
||||||
rm -f sources/.drone.status
|
|
||||||
rm -f sources/.drone.yml
|
|
||||||
rm -f sources/.luacheckrc
|
rm -f sources/.luacheckrc
|
||||||
- name: Set Version and AddonVersion
|
- name: Set Version and AddonVersion
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
Reference in New Issue
Block a user