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

Build/create release action #133

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

AngeCyp
Copy link
Contributor

@AngeCyp AngeCyp commented Mar 20, 2025

This PR add code for Github action to create all necessary artifacts and attach them to a release.

  • Correctly call reusable workflow from alumet-dev/packaging repo
  • Take in count increase of release version on a new build

Close: #115

const assets = latestRelease.data.assets.map(asset => asset.name);
let version = latestRelease.data.tag_name.replace(/^v/i, '');
let release = 1
if (assets.length === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

=== 🤣🤮

Copy link
Contributor Author

Choose a reason for hiding this comment

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

❓"==" 🤣🤮
♻️
❓"===" 🤮🤣
🤙

Comment on lines 125 to 130
for (const asset of assets.data) {
await github.rest.repos.deleteReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
asset_id: asset.id
});
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure that we want to delete every asset?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Else, we can keep keep unwanted and old artifacts. Do you want me to change ?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's not what I meant. But we should replace the .rpm and .deb artifacts but not the others

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we should also replace container images. With this method, tar.gz and zip artifact are not deleted. Do you have an example of artifact we should keep ?

@AngeCyp AngeCyp force-pushed the build/create-release-action branch from 17f55d6 to 49d3561 Compare March 21, 2025 08:59
Copy link
Contributor

@ahuret ahuret left a comment

Choose a reason for hiding this comment

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

Added few comments
I believe the steps would be clearer if there were more context regarding the state of the release (whether it’s creating or updating). This would make the workflow easier to follow. It might help to include suffixes like ‘(Create case)’ and ‘(Update case)’ in the step titles, to clearly indicate which state each step is related to.

@AngeCyp AngeCyp force-pushed the build/create-release-action branch from 49d3561 to 3814ed2 Compare March 24, 2025 10:43
@AngeCyp AngeCyp force-pushed the build/create-release-action branch from 3814ed2 to 02ef184 Compare March 24, 2025 12:43
@AngeCyp AngeCyp requested a review from titouanj March 24, 2025 14:06
@AngeCyp AngeCyp force-pushed the build/create-release-action branch from 02ef184 to 52f7113 Compare March 24, 2025 14:41
needs: gather-informations
uses: alumet-dev/packaging/.github/workflows/build_rpm.yaml@main
with:
target-architecture: x86_64
Copy link
Contributor

Choose a reason for hiding this comment

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

use arch instead

uses: alumet-dev/packaging/.github/workflows/build_rpm.yaml@main
with:
target-architecture: x86_64
build-version: ${{ needs.gather-informations.outputs.version }}
Copy link
Contributor

Choose a reason for hiding this comment

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

use version instead

repo: context.repo.repo,
asset_id: asset.id
});
} catch (error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@AngeCyp AngeCyp force-pushed the build/create-release-action branch from 52f7113 to e59644c Compare March 25, 2025 13:38
@AngeCyp AngeCyp requested a review from ahuret March 25, 2025 14:05
@TheElectronWill
Copy link
Contributor

Can you build Deb packages too?

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.

Provide package with every release
4 participants