Skip to content

Fix release workflow: GitHub token permissions and deprecated actions #109

@rz1989s

Description

@rz1989s

Problem

The release workflow is FAILING due to GitHub token permission issues and deprecated actions.

Latest run: https://github.com/getlumos/lumos/actions/runs/19602113902 (v0.1.1 tag)

Error: Resource not accessible by integration

Root Cause:

  1. GITHUB_TOKEN lacks write permissions (Contents: read, needs: write)
  2. Using deprecated actions/create-release@v1 (unmaintained since 2021)
  3. Using deprecated actions/upload-release-asset@v1 (unmaintained)

Current Workflow Issues

Problems in .github/workflows/release.yml:

  1. Missing Permissions Block - Workflow does not explicitly grant write permissions
  2. Deprecated Actions - actions/create-release@v1 and actions/upload-release-asset@v1 are no longer maintained
  3. Missing Secret Validation - CARGO_REGISTRY_TOKEN used but not validated

Proposed Solution

1. Add Permissions Block

Add after env block: permissions with contents write

2. Replace Deprecated Actions

Use softprops/action-gh-release@v1 or ncipollo/release-action@v1

3. Validate Secrets

Add validation step to check CARGO_REGISTRY_TOKEN exists before publishing


Benefits

  • Release workflow works without permission errors
  • Modern maintained actions
  • Better error messages
  • Automated multi-platform binaries
  • Auto-publish to crates.io

Implementation Plan

Phase 1 Quick Fix:

  • Add permissions: contents: write to release.yml
  • Test with next version tag

Phase 2 Modernize Actions:

  • Replace deprecated create-release and upload-release-asset actions
  • Simplify workflow

Phase 3 Robustness:

  • Add secret validation step
  • Add dry-run mode for testing

Testing Checklist

After fixing test with patch release:

  • GitHub release created successfully
  • Binaries uploaded for all platforms
  • lumos-core published to crates.io
  • lumos-cli published to crates.io
  • lumos-lsp published to crates.io
  • Release notes generated

Required Secrets

Verify CARGO_REGISTRY_TOKEN exists at:
https://github.com/getlumos/lumos/settings/secrets/actions

Generate token at: https://crates.io/me/tokens
Scopes needed: publish-update permission


References

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ciCI/CD, GitHub Actions, build infrastructurepriority:criticalCritical issue breaking core functionalitypublishingPublishing and release tasksstatus:confirmedIssue verified and ready to work ontype:bugSomething isn't working correctly

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions