Automagically tag shit
All checks were successful
Release Workflow / release (push) Successful in 7s

This commit is contained in:
2025-01-29 21:25:24 +01:00
parent 5271029b84
commit a065e47545
2 changed files with 29 additions and 14 deletions

View File

@@ -13,9 +13,35 @@ jobs:
- name: Install zip
run: sudo apt-get install zip
- name: Configure Git
run: |
git config --global user.name "Git Admin"
git config --global user.email "gitadmin@quack-lab.dev"
- name: Run deploy script
run: bash deploy.sh
- name: Check for Existing Release Commit
id: check_release_commit
run: |
# Check if the latest commit is a release commit
if git log -1 --pretty=%B | grep -q "Release"; then
echo "Release commit found. Skipping version bump."
echo "::set-output name=release_commit::true"
else
echo "No release commit found. Proceeding with version bump."
echo "::set-output name=release_commit::false"
fi
- name: Run Release Script
if: steps.check_release_commit.outputs.release_commit == 'false'
run: bash release.sh
- name: Push Changes
if: steps.check_release_commit.outputs.release_commit == 'false'
run: |
git push origin HEAD:refs/heads/master --tags
- name: Determine Tag
id: determine_tag
run: |
@@ -56,6 +82,5 @@ jobs:
http://srv-captain--git:3000/api/v1/repos/dave/wow-Heimdall/releases/tags/${{ steps.determine_tag.outputs.tag }} | jq -r '.id')
curl -X POST \
-H "Authorization: token ${{ secrets.JEBENI_TOKEN }}" \
-H "Content-Type: application/zip" \
--data-binary @Heimdall.zip \
http://srv-captain--git:3000/api/v1/repos/dave/wow-Heimdall/releases/${RELEASE_ID}/assets
-F "attachment=@Heimdall.zip" \
"http://srv-captain--git:3000/api/v1/repos/dave/wow-Heimdall/releases/${RELEASE_ID}/assets?name=Heimdall.zip"

View File

@@ -35,18 +35,8 @@ NEW_VERSION=$(increment_version "$CURRENT_VERSION" "$INCREMENT")
sed -i "s/## Version: $CURRENT_VERSION/## Version: $NEW_VERSION/" Heimdall.toc
sed -i "s/local VERSION = \"$CURRENT_VERSION\"/local VERSION = \"$NEW_VERSION\"/" Heimdall.lua
# Existing deployment steps
rm Heimdall.zip
mkdir Heimdall
cp *.lua *.toc Heimdall
cp -r Modules Heimdall
cp -r Sounds Heimdall
cp -r Texture Heimdall
7z a Heimdall.zip Heimdall
rm -rf Heimdall
# Git operations
git add Heimdall.lua Heimdall.toc Heimdall.zip
git add Heimdall.lua Heimdall.toc
git commit -m "Release $NEW_VERSION"
git tag "$NEW_VERSION"