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

Adding a build and attach to release workflow (upon release publish). #2891

Merged
merged 1 commit into from Apr 13, 2022

Conversation

blckmn
Copy link
Member

@blckmn blckmn commented Apr 11, 2022

Simple workflow to attach the assets once a release is published.

@blckmn blckmn added this to the 10.8.0 milestone Apr 11, 2022
@sonarcloud
Copy link

sonarcloud bot commented Apr 11, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@github-actions
Copy link
Contributor

Do you want to test this code? Here you have an automated build:
Betaflight-Configurator-Android
Betaflight-Configurator-Linux
Betaflight-Configurator-macOS
Betaflight-Configurator-Windows
WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

@McGiverGim
Copy link
Member

Hi! I only wanted to know how different is your publish workflow, because I don't see too much difference with the other one workflow we have.
I don't see too much difference between creating an empty publication, and wait to the action to publish the artifacts, or throw the workflow that creates the artifacts and creates an empty publication.
Maybe is there some other step that I'm not taking into account?

@blckmn blckmn changed the title Adding a build and attach to release workflow (upon release creation). Adding a build and attach to release workflow (upon release publish). Apr 11, 2022
@blckmn
Copy link
Member Author

blckmn commented Apr 11, 2022

The issue is creating artefacts and attaching when a release is in draft is that commits can be added to 'master' (before publishing), invalidating the artefacts. The artefacts potentially need replacing once published.

Copy link
Member

@McGiverGim McGiverGim left a comment

Choose a reason for hiding this comment

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

Ok, understood. I prefer to have the builds before publishing and not after, but you make the release, so how you prefer and is easy to you. Only two comments.

runs-on: ubuntu-20.04
steps:
- name: Code Checkout
uses: actions/checkout@v2
Copy link
Member

Choose a reason for hiding this comment

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

If we continue with the automatic execution, maybe we can, to be sure that we download what we want, specify the tag to be sure that the checkout is the correct one?

I've seen that this action has a version 3. Maybe is good too start to use the latest version. It seems the version 3 is in develop, not released, so ignore this...

Copy link
Member Author

@blckmn blckmn Apr 13, 2022

Choose a reason for hiding this comment

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

Is it not automatically the commit that triggered the run of the job?

EDIT: Confirmed it is the commit that was tagged to trigger the run.


on:
release:
types: [published]
Copy link
Member

Choose a reason for hiding this comment

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

Only a question, maybe is better to add a manual workflow to attach the build artifacts before the publishing? The difference is not too big, but now, the user subscribed receives the notification of a new version, and the artifacts are not available. Is not too much time, 5 minutes more or less if the build goes well (there is a possibility that it has some kind of problem).
And the Android version must be generated (and attached I suppose) out of this flow, so the user will see the Android version but nothing more.
Not a big problem, only wanted to notice it.

@blckmn
Copy link
Member Author

blckmn commented Apr 12, 2022

AUTOMERGE: (FAIL)

  • github identifies PR as mergeable -> FAIL
  • assigned to a milestone -> PASS
  • cooling off period lapsed -> PASS
  • commit count less or equal to three -> PASS
  • Don't merge label NOT found -> PASS
  • at least one RN: label found -> PASS
  • Tested label found -> PASS
  • assigned to an approver -> PASS
  • approver count at least three -> FAIL

Copy link
Member

@McGiverGim McGiverGim left a comment

Choose a reason for hiding this comment

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

Ok. If this is the way you like to work, is ok to me.

Another question: if we launch the "earlier" release flow manually, is this flow released too? If true, then maybe remove the earlier one, it has no sense that the manual one create the artifacts, and this other replace them (or worst, duplicate them).

@blckmn
Copy link
Member Author

blckmn commented Apr 13, 2022

Ok. If this is the way you like to work, is ok to me.

Another question: if we launch the "earlier" release flow manually, is this flow released too? If true, then maybe remove the earlier one, it has no sense that the manual one create the artifacts, and this other replace them (or worst, duplicate them).

Good question. I would hope that it would replace them - or error. I will test that at some point and let you know.

@blckmn blckmn merged commit a61c00c into betaflight:master Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants