Guides incase your GitHub Actions workflow fails to trigger or execute properly, use these steps to diagnose and fix the issue.
1️⃣ Check If the Tag Exists on Remote
git ls-remote --tags origin
If the tag already exists and you need to update it:
git tag -d v1.0.1 # Delete local tag
git push origin --delete v1.0.1 # Delete remote tag
git tag v1.0.1 # Recreate the tag on latest commit
git push origin v1.0.1 # Push it again
2️⃣ Manually Trigger the Workflow
- Go to GitHub → Your Repo → Actions
- Find the workflow for releases
- Click “Run workflow” (if available)
3️⃣ Verify GitHub Actions Settings
Ensure Actions Are Enabled
- Go to:
Settings
→Actions
- Under
General
, ensure that “Allow all actions and reusable workflows” is selected. - If restrictions apply, ensure the repository or organization allows workflow execution.
Check Repository Permissions
- Go to:
Settings
→Actions
→General
- Under
Workflow permissions
, ensure “Read and write permissions” is enabled.
4️⃣ Generate a Personal Access Token (PAT) for Releases
If GITHUB_TOKEN
has permission issues (403 errors), create a Personal Access Token (PAT):
Create PAT
- Go to:
GitHub → Settings → Developer Settings → Personal Access Tokens
- Click “Generate new token (classic)”
- Select Scopes:
repo
(for repository access)workflow
(for actions access)
- Generate the token and copy it (you won’t see it again!)
Use PAT in GitHub Actions
- Go to:
GitHub → Your Repo → Settings → Secrets and Variables → Actions
- Click “New repository secret”
- Name it
PAT_TOKEN
and paste the generated PAT. - Update
release.yml
to use it:
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
tag_name: ${{ github.ref_name }}
body: "Automated release for version ${{ github.ref_name }}"
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
Now, pushing a tag should trigger the workflow successfully.