I've got a release workflow in GitHub that on release will do things like run localise, update version numbers in code, etc., and then create the release.zip file and add it to the release. The automation itself works great, but it does introduce a problem.
Since GitHub creates the release and publishes it, the release then does not have the release.zip file it needs for 3rd party services to pick up until the workflow is complete.
Is there a way to make it so a release won't actually be published until the workflow is complete?
I've got a release workflow in GitHub that on release will do things like run localise, update version numbers in code, etc., and then create the release.zip file and add it to the release. The automation itself works great, but it does introduce a problem.
Since GitHub creates the release and publishes it, the release then does not have the release.zip file it needs for 3rd party services to pick up until the workflow is complete.
Is there a way to make it so a release won't actually be published until the workflow is complete?
Share Improve this question edited yesterday jonrsharpe 122k30 gold badges266 silver badges473 bronze badges asked yesterday K20GHK20GH 6,27121 gold badges84 silver badges127 bronze badges 7 | Show 2 more comments1 Answer
Reset to default 0My recommendation is to do the release in a workflow that is triggered by a tag push, rather than triggering the workflow from the release.
name: release
on:
push:
tags:
- v[0-9]+.**
jobs:
build_and_release:
runs-on: ...
steps:
- <insert steps to build things, including release.zip>
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "release.zip"
I use ncipollo/release-action
in my release workflows, but there are several other workflows out there to do the same thing.
on: push: tags: - v[0-9]+.**
) and creating the release happens in that workflow. – joanis Commented yesterday