Skip to content
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

Add nightly release #1212

Merged
merged 2 commits into from
Aug 12, 2023
Merged

Add nightly release #1212

merged 2 commits into from
Aug 12, 2023

Conversation

kemingy
Copy link
Contributor

@kemingy kemingy commented Aug 12, 2023

This action will check if it has changes compared to the last nightly release, if so, it will delete the last nightly release and create a new one.

@kemingy kemingy changed the title Nightly Add nightly release Aug 12, 2023
@kemingy kemingy marked this pull request as draft August 12, 2023 07:14
Signed-off-by: Keming <[email protected]>

fix condition

Signed-off-by: Keming <[email protected]>

fix action env

Signed-off-by: Keming <[email protected]>

use personal token

Signed-off-by: Keming <[email protected]>

test schedual

Signed-off-by: Keming <[email protected]>

fetch all the tags

Signed-off-by: Keming <[email protected]>

clean tags when delete release

Signed-off-by: Keming <[email protected]>
@kemingy
Copy link
Contributor Author

kemingy commented Aug 12, 2023

According to the GitHub trigger a workflow from a workflow, the default GITHUB_TOKEN cannot trigger another workflow. Thus it requires a personal access token.

You can follow the instructions here to generate a repository level token and save it to this repo setting with the name LYCHEE. It requires the following read/write permission:

  • actions
  • contents

One thing I'm not sure about is the upload-asset failure: tested on my fork repo.

@kemingy kemingy marked this pull request as ready for review August 12, 2023 10:45
.github/workflows/nightly.yml Outdated Show resolved Hide resolved
@mre
Copy link
Member

mre commented Aug 12, 2023

Thanks for that. Added one remark. Apart from that looks good.

Signed-off-by: Keming <[email protected]>
@kemingy
Copy link
Contributor Author

kemingy commented Aug 12, 2023

BTW, this will need to create a nightly release in case to get the git diff. You can trigger the nightly action manually.

@mre mre merged commit a3a0588 into lycheeverse:master Aug 12, 2023
6 of 7 checks passed
@mre
Copy link
Member

mre commented Aug 12, 2023

Thanks! I've created the token now and added it. Let's see if it works. Triggering a build.

@mre
Copy link
Member

mre commented Aug 12, 2023

@mre
Copy link
Member

mre commented Aug 12, 2023

First build worked. Second build failed: https://github.com/lycheeverse/lychee/actions/runs/5842863869/job/15844411326

@kemingy
Copy link
Contributor Author

kemingy commented Aug 13, 2023

Hi @mre, this nightly trigger has two runs:

  1. Manually triggered workflow_dispatch: will create a release with the provided tag, but doesn't delete if the tag already exists (I created this one only for debugging and running the first time purpose)
  2. Scheduled at 8:45 UTC: will check if there are any new commits comparing the previous nightly to the current HEAD. If so, will try to delete the previous nightly release and create a new one.

The second one will be mainly used for the nightly release. We don't need to manually trigger it anymore.

I'll keep an eye on the recent changes to see if the nightly release can work as expected.

@kemingy kemingy deleted the nightly branch August 13, 2023 01:43
@mre
Copy link
Member

mre commented Aug 13, 2023

Thanks for the help with this.
Two more things I've wondered about:

  • shall we mention the git commit somewhere in the release that the nightly is based on? Either in the release notes or the asset names?
  • shall we create the binary assets as well? Right now it's just the tar archive of the source.

@kemingy
Copy link
Contributor Author

kemingy commented Aug 13, 2023

* shall we mention the git commit somewhere in the release that the nightly is based on? Either in the release notes or the asset names?

* shall we create the binary assets as well? Right now it's just the tar archive of the source.
  1. Yes I add the gh release create nightly --generate-notes so it will generate the notes automatically like https://github.com/lycheeverse/lychee/releases/tag/nightly
  2. Yes it will upload the binary assets, I think it's still in progress https://github.com/lycheeverse/lychee/actions/runs/5846357265

@mre
Copy link
Member

mre commented Aug 13, 2023

Awesome work! Looks nice. 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants