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
21 changes: 3 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
name: 🏷️ Auto Tag and Release

# Triggers on push to master branch (fully automated)
#
# IMPORTANT: This workflow requires an ADMIN_TOKEN secret to bypass branch protection rules.
# The ADMIN_TOKEN must be a Personal Access Token or GitHub App token with:
# - Contents: Write permission
# - Actions: Write permission
# - Pull requests: Write permission
# - Repository administration permission (to bypass branch protection)
#
# To set up the ADMIN_TOKEN:
# 1. Create a Personal Access Token with the above permissions
# 2. Add it as a repository secret named 'ADMIN_TOKEN'
# 3. Fallback to GITHUB_TOKEN if ADMIN_TOKEN is not available
on:
push:
branches: [ master ]
Expand All @@ -33,7 +21,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.ADMIN_TOKEN || secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

# Step 2: Validate shell scripts (maintain keegees quality standards)
- name: 🔍 Run ShellCheck
Expand Down Expand Up @@ -115,11 +103,8 @@ jobs:
TAG="v${{ steps.get_next_version.outputs.version }}"
git tag -a "$TAG" -m "🤖 Automated version tag: $TAG"
# Push commits first, then tag (commits have [skip ci] to prevent recursion)
# Use --force-with-lease for safer pushes with admin permissions
git push --force-with-lease
git push
git push origin "$TAG"
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN || secrets.GITHUB_TOKEN }}

# Step 7: Create release archives (source code)
- name: 📦 Create Release Archives
Expand Down Expand Up @@ -217,4 +202,4 @@ jobs:
echo "📦 Release assets:"
echo " - keegees-${{ steps.get_next_version.outputs.version }}.tar.gz"
echo " - keegees-${{ steps.get_next_version.outputs.version }}.zip"
echo "🔗 Release URL: https://github.com/${{ github.repository }}/releases/tag/v${{ steps.get_next_version.outputs.version }}"
echo "🔗 Release URL: https://github.com/${{ github.repository }}/releases/tag/v${{ steps.get_next_version.outputs.version }}"