Skip to content

[WIP] Update GitHub Actions workflow to upload theme zip on release#1

Merged
officialrajdeepsingh merged 2 commits intomainfrom
copilot/update-release-zip-workflow
Feb 22, 2026
Merged

[WIP] Update GitHub Actions workflow to upload theme zip on release#1
officialrajdeepsingh merged 2 commits intomainfrom
copilot/update-release-zip-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 22, 2026

  • Explore repo and understand current release-zip.yml workflow
  • Fix release-zip.yml:
    • Add permissions: contents: write at job level
    • Fix broken YAML (env/GITHUB_TOKEN misindented inside with: block)
    • Add overwrite: true to prevent duplicate asset uploads
    • Use token: ${{ github.token }} in with: block (correct approach for softprops action)
    • Replace github.ref_name with github.event.release.tag_name
    • Remove unintended name: field that would overwrite the release name
    • Switch trigger from created to published (avoids running on drafts)
    • Remove redundant if: github.ref_type == 'tag' guard
    • Add workflow header comment explaining usage
  • Code review applied (clarified comment, used github.token)
  • CodeQL check: 0 alerts
Original prompt

Goal: Ensure the GitHub Actions workflow release-zip.yml in frontendweb3/logly automatically builds a theme zip and uploads it to the latest GitHub Release when a new release is created.

Context:

  • Repo: frontendweb3/logly
  • Default branch: main
  • Theme repo for Ghost (likely needs a zip of the theme files).

What to do:

  1. Inspect .github/workflows/release-zip.yml (or similarly named) to see current triggers, permissions, and upload steps.
  2. Update the workflow so that when a GitHub Release is created/published it:
    • Checks out the repository.
    • Creates a zip artifact of the theme (exclude dev files like .git, .github, node_modules if any, and other non-theme files as appropriate).
    • Uploads the zip as an asset to the release that triggered the workflow (i.e., the release/tag from the event), ensuring it appears on the latest release page.
  3. Use correct permissions:
    • permissions: contents: write (needed to upload release assets).
  4. Use a reliable upload method (e.g., softprops/action-gh-release or GitHub CLI gh release upload) and ensure it targets the correct tag (github.event.release.tag_name).
  5. Name the asset deterministically, e.g., logly-${{ github.event.release.tag_name }}.zip (or repo name).
  6. Add safeguards to avoid duplicate asset uploads (e.g., --clobber for gh release upload or equivalent).
  7. Provide a brief README/workflow comment explaining how to use it.

Acceptance criteria:

  • Creating/publishing a release triggers the workflow.
  • Workflow successfully uploads a .zip file asset to that release.
  • Works for the latest release and for future releases.
  • Workflow uses least-privilege permissions and does not require manual tokens beyond GITHUB_TOKEN.

This pull request was created from Copilot chat.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

… published trigger

Co-authored-by: officialrajdeepsingh <32416397+officialrajdeepsingh@users.noreply.github.com>
@officialrajdeepsingh officialrajdeepsingh marked this pull request as ready for review February 22, 2026 14:48
@officialrajdeepsingh officialrajdeepsingh merged commit b2c70df into main Feb 22, 2026
Copilot stopped work on behalf of officialrajdeepsingh due to an error February 22, 2026 14:49
@officialrajdeepsingh officialrajdeepsingh deleted the copilot/update-release-zip-workflow branch February 22, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants