1 workflow to rule them all
This commit is contained in:
parent
3a6ba18978
commit
e5c49e970a
@ -16,6 +16,8 @@ jobs:
|
|||||||
needs: [Linting]
|
needs: [Linting]
|
||||||
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
|
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
VERSION: ${{ gitea.ref_name }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -31,23 +33,22 @@ jobs:
|
|||||||
rm -f sources/.luacheckrc
|
rm -f sources/.luacheckrc
|
||||||
- name: Set Version and AddonVersion
|
- name: Set Version and AddonVersion
|
||||||
run: |
|
run: |
|
||||||
echo "Version: $GITHUB_REF_NAME"
|
echo "Version: $VERSION"
|
||||||
export VERSION=$GITHUB_REF_NAME
|
export ADDON_VERSION=$(echo $VERSION | sed -E 's/(0|)\.//g')
|
||||||
export ADDON_VERSION=$(echo $GITHUB_REF_NAME | sed -E 's/(0|)\.//g')
|
|
||||||
sed -i "s/0.123456789/$VERSION/g" sources/AchievementInfoCommon.lua
|
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/$VERSION/g" sources/AchievementInfo.txt
|
||||||
sed -i "s/0.123456789/$ADDON_VERSION/g" sources/AchievementInfo.txt
|
sed -i "s/0.123456789/$ADDON_VERSION/g" sources/AchievementInfo.txt
|
||||||
- name: Rename and zip
|
- name: Rename and zip
|
||||||
run: |
|
run: |
|
||||||
mv sources AchievementInfo
|
mv sources AchievementInfo
|
||||||
zip -r "AchievementInfo-$GITHUB_REF_NAME.zip" ./AchievementInfo
|
zip -r "AchievementInfo-$VERSION.zip" ./AchievementInfo
|
||||||
- name: Create release
|
- name: Create release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.token }}
|
token: ${{ secrets.token }}
|
||||||
name: AchievementInfo $GITHUB_REF_NAME
|
name: "AchievementInfo $VERSION"
|
||||||
tag_name: $GITHUB_REF_NAME
|
tag_name: "$VERSION"
|
||||||
body_path: AchievementInfo/CHANGELOG.md
|
body_path: AchievementInfo/CHANGELOG.md
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
Loading…
Reference in New Issue
Block a user