espressif / idf-installer

ESP IDF Windows Installer
https://dl.espressif.com/dl/esp-idf/
101 stars 21 forks source link

Feat/automatic installer release #222

Closed jakub-kocka closed 3 months ago

jakub-kocka commented 3 months ago

Successful workflow example: (espressif-ide installer)

Successful PR with installer release created by the workflow:

Automatic "release" mechanism explanation:

  1. build-installer.yml (build-installer-any workflow) is configured with all needed parameters (installer type, ESP-IDF version, IDE version, Online installer version (app version) ... not all parameters are needed every time)
  2. Based on the configured parameters the workflow for building the correct installer type is called
  3. After the installer is built, the script will edit docs files needed for release (releases.json, index.html, innoSetup) -- index.html:
    • The buttons with Online installer and IDE installer are updated every time
    • The button with Offline installer is updated if the MAJOR and MINOR versions of ESP-IDF are already present in any button
    • If the configured ESP-IDF version for Offline installer is not present in any button, a new button is created at the top (=> if the most top button of offline installers has version v5.2.1 and configured ESP-IDF version will be set to v5.3, the new button will be added above this button)
    • releases.json is updated by adding the new installer release information as the first object
    • IdfToolsSetup.iss is updated with the App or IDE version
  4. The PR with changed files is created (can be reviewed and edited)
  5. After the PR is merged, the update-index workflow is automatically triggered and the download page is updated

! WARNING - After this is merged, the original process of running installer build workflows will be changed (with the tag or manual run) => not backward compatible change

jakub-kocka commented 3 months ago

FYI @tomassebestik

peterdragun commented 3 months ago

The python part LGTM! Overall, this is a really nice improvement to the release process, thank you!

jakub-kocka commented 3 months ago

@georgik I have implemented Jinja2 templating engine for changing (creating) the index.html.

Also, other suggestions were improved. Can you please take a look at it?

Here is the test PR created by the workflow: https://github.com/espressif/idf-installer/pull/233/files

jakub-kocka commented 3 months ago

I have added automatically assigned reviewers for PR and branch name with IDF version if there are multiple releases at the same time before the PR gets merged.

Based on the in-person discussion, I am merging this.