Skip to content
Merged
Changes from 1 commit
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
14 changes: 11 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ jobs:
uses: actions/checkout@v6
with:
fetch-depth: 0 # Need full history for git_ops
# Use PAT to bypass branch protection rules
token: ${{ secrets.RELEASE_TOKEN }}
persist-credentials: false

- name: Setup Elixir
uses: erlef/setup-beam@v1
Expand Down Expand Up @@ -205,8 +204,17 @@ jobs:

- name: Push changes and tags
if: steps.git_ops.outputs.released == 'true'
env:
GITHUB_TOKEN: ${{ github.token }}
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
git push origin main --follow-tags
token="${RELEASE_TOKEN:-$GITHUB_TOKEN}"

if [ -z "$RELEASE_TOKEN" ]; then
echo "::warning::RELEASE_TOKEN is not set; using GITHUB_TOKEN for release push"
fi

git push "https://x-access-token:${token}@github.com/${GITHUB_REPOSITORY}.git" main --follow-tags

release:
name: Create GitHub Release
Expand Down