fix: update the prerelease logic

This commit is contained in:
Nate Kelley 2025-01-16 14:54:51 -07:00
parent 500e5ddc31
commit d6e6f41165
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
2 changed files with 5 additions and 4 deletions

View File

@ -43,6 +43,8 @@ jobs:
# Debug: Check if version.txt exists # Debug: Check if version.txt exists
if [ -f "version.txt" ]; then if [ -f "version.txt" ]; then
echo "version.txt exists" echo "version.txt exists"
echo "Current content of version.txt:"
cat version.txt
else else
echo "version.txt does not exist" echo "version.txt does not exist"
fi fi
@ -58,16 +60,15 @@ jobs:
# Export both versions for later steps # Export both versions for later steps
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
# Step 5: Update version.txt if version changes # Step 5: Update version.txt if version changes
- name: Update version.txt - name: Update version.txt
if: env.CURRENT_VERSION != env.NEW_VERSION # Run only if the versions are different if: env.CURRENT_VERSION && env.CURRENT_VERSION != env.NEW_VERSION # Run only if version exists and versions are different
run: | run: |
echo "$NEW_VERSION" > version.txt echo "$NEW_VERSION" > version.txt
# Step 6: Commit and Push Changes # Step 6: Commit and Push Changes
- name: Commit and Push Changes - name: Commit and Push Changes
if: env.CURRENT_VERSION != env.NEW_VERSION # Run only if the versions are different if: env.CURRENT_VERSION && env.CURRENT_VERSION != env.NEW_VERSION # Run only if version exists and versions are different
run: | run: |
git config --global user.name "github-actions[bot]" git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.email "github-actions[bot]@users.noreply.github.com"

View File

@ -1 +1 @@
0.0.1