Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 39 additions & 10 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,54 @@ jobs:
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# Create version tag if version label exists
CREATE_VERSION_TAG=false
CREATE_NETWORK_TAG=false

# Check if version tag should be created
if [ -n "${{ steps.get_tags_labels.outputs.version }}" ] && [ "${{ steps.get_tags_labels.outputs.version }}" != "null" ]; then
if git rev-parse "${{ steps.get_tags_labels.outputs.git_tag }}" >/dev/null 2>&1; then
echo "⚠️ Tag ${{ steps.get_tags_labels.outputs.git_tag }} already exists, skipping"
echo "❌ Version tag ${{ steps.get_tags_labels.outputs.git_tag }} already exists. Please create a new tag."
exit 1
else
git tag -a "${{ steps.get_tags_labels.outputs.git_tag }}" -m "Release version ${{ steps.get_tags_labels.outputs.version }}"
git push origin "${{ steps.get_tags_labels.outputs.git_tag }}"
echo "✅ Created version tag ${{ steps.get_tags_labels.outputs.git_tag }}"
CREATE_VERSION_TAG=true
fi
fi

# Create zeam network tag if network label exists
# Check if network tag should be created
if [ "${{ steps.get_tags_labels.outputs.has_network_tag }}" = "true" ]; then
ZEAM_GIT_TAG="${{ steps.get_tags_labels.outputs.zeam_tag }}"
if git rev-parse "$ZEAM_GIT_TAG" >/dev/null 2>&1; then
echo "⚠️ Zeam tag $ZEAM_GIT_TAG already exists, skipping"
echo "❌ Network tag $ZEAM_GIT_TAG already exists. Please create a new tag."
exit 1
else
git tag -a "$ZEAM_GIT_TAG" -m "Zeam network tag for ${{ steps.get_tags_labels.outputs.zeam_tag }}"
git push origin "$ZEAM_GIT_TAG"
echo "✅ Created zeam tag $ZEAM_GIT_TAG"
CREATE_NETWORK_TAG=true
fi
fi

# Create version tag if needed
if [ "$CREATE_VERSION_TAG" = "true" ]; then
git tag -a "${{ steps.get_tags_labels.outputs.git_tag }}" -m "Release version ${{ steps.get_tags_labels.outputs.version }}"
git push origin "${{ steps.get_tags_labels.outputs.git_tag }}"
echo "✅ Created version tag ${{ steps.get_tags_labels.outputs.git_tag }}"
fi

# Create network tag if needed
if [ "$CREATE_NETWORK_TAG" = "true" ]; then
git tag -a "$ZEAM_GIT_TAG" -m "Zeam network tag for $ZEAM_GIT_TAG"
git push origin "$ZEAM_GIT_TAG"
echo "✅ Created zeam tag $ZEAM_GIT_TAG"
fi
echo "create_version_tag=$CREATE_VERSION_TAG" >> $GITHUB_OUTPUT
echo "create_network_tag=$CREATE_NETWORK_TAG" >> $GITHUB_OUTPUT

- name: Create GitHub Release
if: ${{ steps.create_tags.outputs.create_version_tag == 'true' || steps.create_tags.outputs.create_network_tag == 'true' }}
uses: actions/create-release@v1
with:
tag_name: ${{ steps.get_tags_labels.outputs.git_tag != '' && steps.get_tags_labels.outputs.git_tag != 'null' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}
release_name: Release ${{ steps.get_tags_labels.outputs.git_tag != '' && steps.get_tags_labels.outputs.git_tag != 'null' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}
Comment on lines +106 to +109
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actions/create-release@v1 action is deprecated and no longer maintained. Consider using softprops/action-gh-release or the GitHub CLI (gh release create) instead for creating releases.

Suggested change
uses: actions/create-release@v1
with:
tag_name: ${{ steps.get_tags_labels.outputs.git_tag != '' && steps.get_tags_labels.outputs.git_tag != 'null' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}
release_name: Release ${{ steps.get_tags_labels.outputs.git_tag != '' && steps.get_tags_labels.outputs.git_tag != 'null' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_tags_labels.outputs.git_tag != '' && steps.get_tags_labels.outputs.git_tag != 'null' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}
name: Release ${{ steps.get_tags_labels.outputs.git_tag != '' && steps.get_tags_labels.outputs.git_tag != 'null' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}

Copilot uses AI. Check for mistakes.
body: Release ${{ steps.get_tags_labels.outputs.git_tag != '' && steps.get_tags_labels.outputs.git_tag != 'null' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}
Comment on lines +108 to +110
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional logic doesn't properly handle cases where both version and network tags are created. The workflow only creates one release but may create two tags. Consider using the output flags to determine which tag was created: prefer git_tag when create_version_tag is true, otherwise use zeam_tag.

Suggested change
tag_name: ${{ steps.get_tags_labels.outputs.git_tag != '' && steps.get_tags_labels.outputs.git_tag != 'null' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}
release_name: Release ${{ steps.get_tags_labels.outputs.git_tag != '' && steps.get_tags_labels.outputs.git_tag != 'null' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}
body: Release ${{ steps.get_tags_labels.outputs.git_tag != '' && steps.get_tags_labels.outputs.git_tag != 'null' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}
tag_name: ${{ steps.create_tags.outputs.create_version_tag == 'true' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}
release_name: Release ${{ steps.create_tags.outputs.create_version_tag == 'true' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}
body: Release ${{ steps.create_tags.outputs.create_version_tag == 'true' && steps.get_tags_labels.outputs.git_tag || steps.get_tags_labels.outputs.zeam_tag }}

Copilot uses AI. Check for mistakes.
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YAML indentation error. The GITHUB_TOKEN line should be indented with 2 spaces relative to env: to properly align as a child property. Currently it's at the same indentation level as env:.

Suggested change
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Copilot uses AI. Check for mistakes.