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

Actions for nightly release #14

Merged
merged 24 commits into from
Aug 9, 2023
Merged

Conversation

ShiriNmi1520
Copy link
Contributor

@ShiriNmi1520 ShiriNmi1520 commented Aug 6, 2023

TODO Lists

  • Create nightly release
  • Check whatever master branch changed before create release
  • Include gulp build command
  • Make msbuild to generate single executable for release

Feature

Automatically create nightly release #11

Description

I've completed the workflow for creating nightly release at 2 AM (UTC+8) (GitHub Actions hosted runner use UTC)
At 2 AM, the workflow will fetch the latest built artefacts and update the nightly release title & content (You can modify the release title and content in the yml file or just edit release info)

If you want, you can modify when will nightly release will be created (There's an expected delay if you using GitHub shared runner for the build, probably around 3 to 10 minutes)

P.S: The following screenshot date was yesterday from the day I created the pull request cause GitHub Actions use UTC as I mentioned before, I can modify it to use UTC +8 timezone or you can leave it to use UTC instead)

Screenshot

image

@ShiriNmi1520 ShiriNmi1520 changed the title Actions for nightly release #11 Actions for nightly release Aug 6, 2023
@ShiriNmi1520
Copy link
Contributor Author

About task number 2 I found a GitHub Action called nightly-check which is suitable for this task, but it requires further fix since my workflow always failed after implementing it.
I've submitted a PR to original repository and waiting for approved and pulled into main.

@ShiriNmi1520
Copy link
Contributor Author

nightly-check approved my last pull request, adding check now.

@hbl917070
Copy link
Owner

The steps to export a zip file from Tiefsee are:

  1. Run gulp watch in the Tiefsee/www directory to package ts, scss, ejs, and svg into static web pages.
  2. Compile Tiefsee4.sln (Tiefsee.csproj already includes the syntax to copy the static web pages from Tiefsee/www to the output directory, but does not include automatic execution of gulp).
  3. Go to the runtimes directory in the output directory and keep only win-x64, deleting all others (I'm not sure why these useless files are generated, I've already set the build target to win x64).

If you don't do step 3, you'll just have an extra 70M of useless files, but if you don't do step 1, Tiefsee.exe won't run.

So I'm not sure if this automation flow is feasible.

@ShiriNmi1520
Copy link
Contributor Author

ShiriNmi1520 commented Aug 6, 2023

Thanks for the feedback, in my workflow, I did not include part executing gulp watch to generate packaged web pages.

About useless files mentioned in step 3 might be related to the msbuild command in workflow, according to I know msbuild will copy essential file that makes the program run into the output directory (Just like step 2 which copies static web pages into the output directory), there could be a way to tell msbuild to generate a single executable file and we can upload it to release which I will look into it later today.

I'll upload the todo list for now and hope I can solve them later.😉

@hbl917070
Copy link
Owner

hbl917070 commented Aug 6, 2023

359843d
gulp watch is a development mode that continuously monitors file changes, which may cause problems.
I added another command gulp build, which will only be executed once.

@ShiriNmi1520
Copy link
Contributor Author

359843d

gulp watch is a development mode that continuously monitors file changes, which may cause problems.

I added another command gulp build, which will only be executed once.

Appreciation for updating, that definitely will help me to get things done 😀

ShiriNmi1520 and others added 20 commits August 7, 2023 14:32
Add build project workflow
Add archive output path after successful build
Fix msbuild command
Fix upload archive file
Update actions version
Trying fix archive file not found
Remove upload artifact job since there's not previous artifacts on build job
Rename dotnet.yml to build.yml
Add nightly workflow and waiting for test
Temporary remove schedule attribute to test nightly release
Use different action to download artifact from another workflow.
Fix required permission for create release
Fix could not find files to upload
Add schedule to create nightly release at 2AM
Add check job to check if master branch changed before create release
Remove trigger nightly workflow after build workflow completed
Change from 0200 to 0000
Test nightly release (Timezone is UTC)
Remove check nightly since it seems not working properly
Set create nightly release at 2AM UTC+8
This reverts commit a55a197.
Add script to build gulp assets
@ShiriNmi1520
Copy link
Contributor Author

I've completed adding gulp build during workflow and expect to complete msbuild part by weekend

@ShiriNmi1520
Copy link
Contributor Author

I've also noticed that check nightly workflow was finished with error, I'll trying implement a patch on it before continue
image

Update actions version
@hbl917070 hbl917070 merged commit afb98eb into hbl917070:master Aug 9, 2023
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