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

Separate workflows for creating release and publishing to JetBrains #19

Merged
merged 3 commits into from Nov 10, 2020

Conversation

JojOatXGME
Copy link
Contributor

This is an update for the release workflow(s). It addresses the issue of pull request #16 that you cannot re-run the step which publishes the release to JetBrains Marketplace. After this branch is merged, you can trigger the workflow Publish to JetBrains Marketplace manually without creating a new release.

I also changed the release process because releases created by GitHub Actions will not trigger any workflow. This means creating a release with GitHub Actions would not trigger the workflow which publishes the release to JetBrains Marketplace. To overcome this issue, the workflow Publish release is renamed to Prepare Release and will create drafts instead of actual releases. It will create a new draft whenever the master branch is updated. When you publish the draft as a release, GitHub tiggers the second workflow which publishes the release to JetBrains Marketplace.

Note that you shouldn't usually trigger Publish to JetBrains Marketplace manually. You should only trigger it manually if something was going wrong previously. If you want to publish a new version, you should create a new release instead.

As a caveat of this change, the binary for JetBrains Marketplace is build independently from the binary for the GitHub release. Since the build is not fully reproducible, both binaries may not be exactly the same. Anyway, both are build from the same sources.

PS: I got some inspiration from JetBrains/intellij-platform-plugin-template. While looking at this template, I already worked at some more improvments like bumping the version after the release. However, I wanted to fix the issue about the publication process first.

@JojOatXGME
Copy link
Contributor Author

JojOatXGME commented Nov 10, 2020

Since there was no change to the plugin since v0.3.0.0 and the version has not been bumped yet, I suggest to trigger Publish to JetBrains Marketplace once manually. Since we added the --stacktrace option, I hope we get some more insights about our issue from #16.

If you want to try the publication without merging the branch into master yet, you can copy the branch to the official repository and change the trigger to on: [ push ]. (This will trigger the workflow as soon as you push the commit, even when it is on a different branch.)

@Mic92 Mic92 merged commit 463cac0 into NixOS:master Nov 10, 2020
@Mic92
Copy link
Member

Mic92 commented Nov 10, 2020

I had to run the publish task from master, when running manually:
I hope you can get insights from the stack trace:
https://github.com/NixOS/nix-idea/runs/1378140699?check_suite_focus=true

@Mic92
Copy link
Member

Mic92 commented Nov 10, 2020

Maybe we should just as a maintainer to the repository to debug this?

@JojOatXGME
Copy link
Contributor Author

Upload failed: Cannot find org.nixos.idea. Note that you need to upload the plugin to the repository at least once manually (to specify options like the license, repository URL etc.). Follow the instructions: https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/publishing_plugin.html

The problem is that the ID of the plugin has been been changed from nix-idea to org.nixos.idea in 6581d47...ea2c5c8.

@JojOatXGME
Copy link
Contributor Author

I created #20 to fix the issue.

@JojOatXGME
Copy link
Contributor Author

JojOatXGME commented Nov 10, 2020

Looks like JetBrains/intellij-platform-gradle-plugin#507 has already fixed the issue of not showing the actual error message (without the --stacktrace option). I would still keep the --stacktrace option if we update the plugin since it might help with other issues in the future as well.

@JojOatXGME JojOatXGME deleted the extract_publishing_to_jetbrains branch November 10, 2020 14:26
@JojOatXGME
Copy link
Contributor Author

Maybe we should just as a maintainer to the repository to debug this?

Not sure what you wanted to say there.

@Mic92
Copy link
Member

Mic92 commented Nov 12, 2020

Maybe you should become a maintainer of this repository so you can fix this properly.

@JojOatXGME
Copy link
Contributor Author

I guess that is not necessary since we have fixed the issue. But thanks for considering it. Also before becomming an actual mmaintainer, I think I should become a more active user of Nix in general.

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.

None yet

2 participants