-
-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for automatic nightly release #149
Comments
@Yamakaky I'm not sure what the request is? When a release is published, if the tag doesn't yet exist, it will create it. Combined with Roughly.... name: Daily releases
on:
schedule:
- cron: '0 1 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Compute the release tag
run: |
echo "release_tag=v`date '+%Y-%m-%d'`" >> $GITHUB_ENV
- name: Create the release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.release_tag }}
target_commitish: main |
I assume that means a release per day? I would like to have a permanent Nightly release based on master that contains the latest binaries. |
I see. Interesting. I don't think GitHub itself has support for that kind of thing, so it seems unlikely that would be built into this action. Disclaimer: I'm not a maintainer, just a random person who happened to be wandering by. One semi-hacky workaround I could imagine is adding a step to the build that looks up releases by name, deletes the "Nightly" release by ID, then does the workflow I mentioned in the previous commit. Something like: name: Daily releases
on:
schedule:
- cron: '0 1 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Compute the release tag
run: |
echo "release_tag=v`date '+%Y-%m-%d'`" >> $GITHUB_ENV
- name: Find the previous nightly build's ID
run: # TODO Actually implement, https://docs.github.com/en/rest/reference/repos#list-releases
- name: Delete the previous nightly
run: # TODO Actually implement, https://docs.github.com/en/rest/reference/repos#delete-a-release
- name: Create the release
uses: softprops/action-gh-release@v1
with:
name: Nightly
tag_name: ${{ env.release_tag }}
target_commitish: main This would still create a new tag each day, unless you set |
Actually, if you are able to keep it as a Draft release, you don't have to do anything special?
Seems to work fine with my test repo (the |
But then only you can see drafts I think? |
You're right. TIL. (I had always assumed that Drafts were meant to be used as pre-releases, but of course pre-releases are a separate thing) So the best I think you can do is delete the previous nightly release each time, and deal with the daily tags that it would create. Sorry that I don't have a better solution, but I'm also not sure that GitHub offers one. |
Kinda similar to #171 |
But isn't delete tag and create tag causing issue with git? People might have a conflict if they pull down tag. |
It would be nice to have an auto-update nightly release that follows a branch, like master. I think it requires that a tag is created/updated at each push.
See https://github.com/eine/tip for a working example.
The text was updated successfully, but these errors were encountered: