Skip to content

feat(electron-publish): add gitlab publisher #9209

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

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

daihere1993
Copy link
Contributor

@daihere1993 daihere1993 commented Jul 19, 2025

As title, this is a new feat about gitlab publisher referring to the existing behaviors of githubPublisher. With this feat then we can fully support gitlab platform combined with GitlabUpdater.

Notes:

  1. As the legacy test structure is pretty messy, I’ve introduced a more semantic folder structure for the GitlabPublisher that includes both unit and integration tests. By the way, we can progressively refactor legacy tests following similar structure in the future.
  2. The new integration tests require the GITLAB_TOKEN environment variable, tied to the gitlab repo of gitlab-electron-updater-test. To enable this in CI/CD, I suggest adding a new private variable for the token. Let me know if you’re okay with this approach.
    (For reference, the tests have been verified successfully in my local environment.)

Details about new interface getBlockMapFiles() in Provider:
The legacy behavior required the block map file to be in the same folder as the base file. However, when publishing GitLab assets via project_upload, GitLab generates a unique path for each asset, making the legacy approach ineffective. To address this, I introduced a new getBlockMapFiles() interface in Provider and moved the legacy logic into a default implementation. This allows GitlabProvider to override the method with custom logic. It’s a more flexible solution and remains backward compatible.

Copy link

changeset-bot bot commented Jul 19, 2025

🦋 Changeset detected

Latest commit: a485f93

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
app-builder-lib Patch
builder-util-runtime Patch
electron-publish Patch
electron-updater Patch
dmg-builder Patch
electron-builder-squirrel-windows Patch
electron-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch
builder-util Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@daihere1993
Copy link
Contributor Author

@mmaietta fyi

@daihere1993
Copy link
Contributor Author

@mmaietta by the way, let me know your comments about docs update, better to provide some guide then I can know how to update.

@mmaietta
Copy link
Collaborator

Did you change something in your Gitlab repo? I may need to fork it...because tests broke seem to have been continually broken on master

@daihere1993
Copy link
Contributor Author

Did you change something in your Gitlab repo? I may need to fork it...because tests broke seem to have been continually broken on master

Do you see any gitlab related errors logs?

cannot resolve https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z: status code 503

I see many above github 503 errors.

@daihere1993
Copy link
Contributor Author

daihere1993 commented Jul 29, 2025

@mmaietta Sorry, I published a new version v1.1.0 in gitlab repo in order to test getBlockMapFiles() in this PR that impacts the tests on the master branch.

I've created a separate PR (#9221) to fix the failing tests, so they no longer block the CI on the master branch.

This was a silly mistake—really sorry about that. I should have created a new dedicated gitlab repo specifically for GitlabPublisher related tests to avoid issues like this in the future.

Do you have any thoughts or suggestions on this approach?

@mmaietta
Copy link
Collaborator

This was a silly mistake—really sorry about that. I should have created a new dedicated gitlab repo specifically for GitlabPublisher related tests to avoid issues like this in the future.

This is what I do. There's not really a simple way other than that since it needs to be a full e2e test with github/gitlab/etc.

@daihere1993 daihere1993 force-pushed the feat/gitlab-publisher branch from 886c67e to 124d2f2 Compare August 4, 2025 07:12
@daihere1993
Copy link
Contributor Author

There are two tests(two-package and pkg scripts) failed, they seems to be flaky tests. @mmaietta please have a look.

@daihere1993
Copy link
Contributor Author

I've created a dedicated PR to fix these two flaky tests #9251

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.

2 participants