Packaging workflow using actions does not upload to latest release #180854
Replies: 4 comments
-
|
Your build is actually working. The packages aren’t “vanishing”, they’re never being attached to the release in the first place. There are three separate issues in this workflow that explain the behavior.
This is the biggest blocker. You are using: on: In that context, these conditions are false: if: github.ref_type == 'tag' Because workflow_run is triggered by another workflow, not by a tag push. As a result, both softprops/action-gh-release steps are silently skipped. That alone explains why nothing ends up in the release. Fix: remove that condition entirely, or gate on the tag explicitly via the event payload.
You currently have: permissions: Uploading assets to a release requires write access. The action may appear to run, but GitHub will not attach anything. Fix: permissions:
You are doing: tag_name: ${{ steps.get_release.outputs.release_name }} But release_name is not the same thing as a tag. Fix: pass the actual tag, for example the version you already extracted: tag_name: ${{ needs.extractTag.outputs.my_version }} Or retrieve the release tagName instead of name via gh. Why artifacts appear but releases don’t actions/upload-artifact works because it stores files inside the workflow Release uploads fail because: the step is skipped permissions are insufficient the wrong identifier is used Nothing is being deleted. The release upload never happens. |
Beta Was this translation helpful? Give feedback.
-
|
To fix the issue: Remove if: github.ref_type == 'tag' Change permissions to contents: write Pass a tag, not a release name, to action-gh-release Once those are corrected, the RPM and DEB files will reliably appear in the release assets. |
Beta Was this translation helpful? Give feedback.
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
|
The packages are not disappearing; the upload step is never actually attaching them to the release. First, the workflow is triggered by on:
workflow_run:
workflows: [Multi platform Release]
types:
- completedBecause of this, the event context does not contain a tag. The condition below will always evaluate to false: if: github.ref_type == 'tag'As a result, the step that uploads the files to the release is skipped: - name: Attach to Existing Release
uses: softprops/action-gh-release@v2Removing that condition allows the step to run. The second issue is permissions. The workflow currently uses read-only access: permissions:
contents: readUploading assets to a release requires write access. Change it to: permissions:
contents: writeAfter removing the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Why are you starting this discussion?
Question
What GitHub Actions topic or product is this about?
Workflow Configuration
Discussion Details
I have a workflow that runs successfully (no errors produced) by generating an RPM and DEB packages for the latest repository release tag. However, when it finishes the action does not deposit the generated RPM/DEB packages into the latest release, they simply vanish.
Pre-conditions
Workflow
Beta Was this translation helpful? Give feedback.
All reactions