Skip to content

Add CI workflow to publish releases #31

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

Merged
merged 5 commits into from
Nov 21, 2022

Conversation

MatteoPologruto
Copy link
Contributor

@MatteoPologruto MatteoPologruto commented Nov 17, 2022

On every push of a tag named with a version format:

  • Build the project for all supported platforms.
  • Use gon to sign and notarize the macOS builds.
  • Create a GitHub release.
    • Builds and checksums are attached as release assets
    • A changelog generated by arduino/create-changelog from the commit history is added to the release description
    • If the tag has a pre-release version suffix, the GitHub release will be marked as a pre-release.
  • Upload the builds to Arduino's downloads server.

Additional information

The workflow has been modified to create parallel builds for each OS and calculate the relative checksums once, at the end of the process.
Test run: https://github.com/MatteoPologruto/arduinoOTA/actions/runs/3487993513
Test release: https://github.com/MatteoPologruto/arduinoOTA/releases/tag/99.99.99

@MatteoPologruto MatteoPologruto added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Nov 17, 2022
@MatteoPologruto MatteoPologruto self-assigned this Nov 17, 2022
Copy link
Contributor

@umbynos umbynos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove also deploy.sh.

something is wrong with the version:

./arduinoOTA -version
1.3.0

@MatteoPologruto
Copy link
Contributor Author

MatteoPologruto commented Nov 17, 2022

I think we can remove also deploy.sh.

something is wrong with the version:

./arduinoOTA -version
1.3.0

It should be okay now.

@@ -1,46 +0,0 @@
#!/bin/bash -xe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are removing this, and this is the only shell script, maybe we should remove also https://github.com/arduino/arduinoOTA/blob/ce63040f98ce22778810220179c0d9f234c6a440/.github/workflows/check-shell-task.yml

@umbynos umbynos requested a review from facchinm November 17, 2022 16:12
@umbynos
Copy link
Contributor

umbynos commented Nov 17, 2022

Version printing LGTM

@umbynos
Copy link
Contributor

umbynos commented Nov 18, 2022

The check markdown links is expected to fail, while the check markdown nope. @per1234 do you have an idea on why is failing?

@MatteoPologruto
Copy link
Contributor Author

MatteoPologruto commented Nov 18, 2022

The check markdown links is expected to fail, while the check markdown nope. @per1234 do you have an idea on why is failing?

@umbynos I think it's because there are some problems with the downloaded schema. The file-url is actually different from the file url used in the assets repo. I could fix it in a separate PR.

@umbynos
Copy link
Contributor

umbynos commented Nov 18, 2022

Oh right arduino/tooling-project-assets@888fcbf 🤦‍♂️

On every push of a tag named with a version format:

- Build the project for all supported platforms.
- Sign and notarize the macOS builds.
- Create a GitHub release.
  - Builds and checksums are attached as release assets
  - A changelog generated from the commit history is added to the release description
  - If the tag has a pre-release version suffix, the GitHub release will be marked as a pre-release.
- Upload the builds to Arduino's downloads server.
Introducing the use of a matrix, greatly improves time performances during the build making process, since each build task is performed simultaneously. To support this, a check has been added to avoid
creating the same changelog more than once.
The calculation of the checksums has also been modified. Previously, it was done three (3) times at different stages of the workflow. This is pointless, since the only checksums that matter are the ones
calculated when the files are in their final form. For this reason, it is now only done once during the release creation.
@MatteoPologruto MatteoPologruto mentioned this pull request Nov 18, 2022
@umbynos umbynos linked an issue Nov 18, 2022 that may be closed by this pull request
@MatteoPologruto MatteoPologruto merged commit 5a1cb73 into arduino:master Nov 21, 2022
@MatteoPologruto MatteoPologruto deleted the release-CI branch November 21, 2022 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create release CI
3 participants