elderscrolls-addon-achievem.../.gitea/workflows/release.yaml

35 lines
1.1 KiB
YAML
Raw Normal View History

2024-09-20 01:10:30 +00:00
name: Build & Release
run-name: ${{ gitea.actor }} is creating a new release 🚀
2024-09-20 01:16:39 +00:00
on: [push]
#push:
#tags:
# - '**'
2024-09-20 01:10:30 +00:00
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
2024-09-20 01:16:39 +00:00
with:
path: sources
2024-09-20 01:10:30 +00:00
- name: Delete unneeded files/dirs
run: |
rm -rf sources/.git
2024-09-20 01:19:16 +00:00
rm -rf sources/.gitea
2024-09-20 01:10:30 +00:00
rm -rf sources/screenshots
rm -f sources/.drone.status
rm -f sources/.drone.yml
rm -f sources/.luacheckrc
- name: Set Version and AddonVersion
run: |
2024-09-20 01:13:57 +00:00
echo "Version: $GITHUB_REF_NAME"
export VERSION=$GITHUB_REF_NAME
export ADDON_VERSION=$(echo $GITHUB_REF_NAME | sed -E 's/(0|)\.//g')
2024-09-20 01:10:30 +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
- name: Rename and zip
run: |
mv sources AchievementInfo
2024-09-20 01:13:57 +00:00
zip -r "AchievementInfo-$GITHUB_REF_NAME.zip" ./AchievementInfo