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

ci: add publish workflow for releasing on CI automatically #207

Merged
merged 7 commits into from
Jul 11, 2022

Conversation

JounQin
Copy link
Member

@JounQin JounQin commented Jul 6, 2022

close #177
close #188

@asbjornu Can you please help to review the publishing workflow?

@wooorm An OPEN_VSX_TOKEN and a VSCE_TOKEN secrets are required.

@JounQin JounQin added the release label Jul 6, 2022
@JounQin JounQin requested review from wooorm and a team July 6, 2022 08:34
@JounQin JounQin self-assigned this Jul 6, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2022

📊 Package size report   13%↑

File Before After
.changeset/config.json 312 B
.changeset/loud-weeks-laugh.md 88 B
.changeset/README.md 510 B
.changeset/selfish-birds-lick.md 69 B
.github/workflows/publish.yml 1.2 kB
.github/workflows/release.yml 323 B
.github/workflows/version.yml 1.0 kB
.vscodeignore 101 B 2%↑103 B
package.json 4.5 kB 1%↑4.5 kB
README.md 6.8 kB -0.47%↓6.8 kB
release.sh 214 B
Total (Includes all files) 24.6 kB 13%↑27.9 kB
Tarball size 10.9 kB 10%↑12.0 kB
Unchanged files
File Size
.commitlintrc 35 B
.editorconfig 161 B
.eslintignore 22 B
.eslintrc 191 B
.github/FUNDING.yml 234 B
.github/workflows/ci.yml 551 B
.github/workflows/pkg-size.yml 489 B
.lintstagedrc.js 46 B
.prettierrc 24 B
.renovaterc 35 B
.simple-git-hooks.js 51 B
.vscode/launch.json 540 B
.yarnrc 20 B
assets/mdx.png 3.3 kB
CHANGELOG.md 2.5 kB
language-configuration.jsonc 1.1 kB
LICENSE 1.1 kB
patches/eslint-mdx+2.0.1.patch 796 B
syntaxes/mdx.tmLanguage.json 1.3 kB
test/component.js 54 B
test/fixture.mdx 423 B

🤖 This report was automatically generated by pkg-size-action

Copy link

@silvenon silvenon left a comment

Choose a reason for hiding this comment

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

Other stuff looks 👌

.github/workflows/publish.yml Outdated Show resolved Hide resolved
Copy link
Member

@wooorm wooorm left a comment

Choose a reason for hiding this comment

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

I don’t see anything weird, but I have no real experience with publishing to vscode.

I have completely forgotten how to get those tokens. Any ideas? Must I add them before this can be merged?

@JounQin
Copy link
Member Author

JounQin commented Jul 9, 2022

I have completely forgotten how to get those tokens. Any ideas? Must I add them before this can be merged?

Right. For vsce, it should be added at https://dev.azure.com/{account}/_usersSettings/tokens, for open-vsx, I'm also not so familiar too. Maybe @asbjornu can offer some help.

@JounQin
Copy link
Member Author

JounQin commented Jul 9, 2022

@wooorm

And also, I'd like to enable https://github.com/changesets/changesets for auto releasing with better CHANGELOG, just sent an installation request, can you help to accept?

@JounQin
Copy link
Member Author

JounQin commented Jul 9, 2022

@wooorm

EclipseFdn/open-vsx.org#423

It seems you've claimed already for open-vsx.

And the next questions are:

  1. can you give me the open-vsx namespace permission?
  2. can you add me into the azure organization with correct permission?
  3. can you enable my permission to manage the Actions secrets?

@wooorm
Copy link
Member

wooorm commented Jul 10, 2022

I approved the two applications you requested on the two repos you maintain here

can you give me the open-vsx namespace permission?

I added you as a contributor on open-vcx. Which permissions do you mean?

can you add me into the azure organization with correct permission?

You already are a contributor in that organization. What else do you need.

can you enable my permission to manage the Actions secrets?

As discussed before, I don’t think that it's safe for all members to access all information in the unified organizations that has many different contributors. We already have a releasers team in the MDX organization that has access to that, and we have the core team that has access to that. I think we should have a small number of people that have access to vulnerable information.

There is already a VSCE_TOKEN secret here from March 2021 btw.

@wooorm
Copy link
Member

wooorm commented Jul 10, 2022

For vsce, it should be added at https://dev.azure.com/{account}/_usersSettings/tokens

I believe that all the docs on vscode extensions are out of date. These URLs and guides don’t work for me.

@JounQin
Copy link
Member Author

JounQin commented Jul 10, 2022

@wooorm Great to know! Then the last thing left should be OPEN_VSX_TOKEN which should have publish permission?

@JounQin
Copy link
Member Author

JounQin commented Jul 10, 2022

I added you as a contributor on open-vcx. Which permissions do you mean?

image

Besides, I see no namespace available to me on open-vsx.org still.

@wooorm
Copy link
Member

wooorm commented Jul 10, 2022

There is already a VSCE_TOKEN secret here from March 2021 btw.

Did you add this a year ago? Perhaps its old and not for unifiedjs?

Then the last thing left should be OPEN_VSX_TOKEN

I added a OPEN_VSX_TOKEN token.

Besides, I see no namespace available to me on open-vsx.org still.

Screen Shot 2022-07-10 at 19 31 24

@JounQin
Copy link
Member Author

JounQin commented Jul 10, 2022

Did you add this a year ago? Perhaps its old and not for unifiedjs?

I have no permission to add secret.

The token will be expired in one year, that's a question.

@JounQin
Copy link
Member Author

JounQin commented Jul 10, 2022

@wooorm

https://dev.azure.com/{account}/_usersSettings/tokens

This link is not outdated and works to me, maybe you have a different username for Microsoft account?

@JounQin
Copy link
Member Author

JounQin commented Jul 11, 2022

remarkjs/vscode-remark#40 (comment)

Previous context that may help. @wooorm

cc @asbjornu Do you have a latest VSCE_TOKEN.

@changeset-bot
Copy link

changeset-bot bot commented Jul 11, 2022

🦋 Changeset detected

Latest commit: 338c662

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

This PR includes changesets to release 1 package
Name Type
vscode-mdx Major

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

@wooorm
Copy link
Member

wooorm commented Jul 11, 2022

maybe you have a different username for Microsoft account?

I indeed have different accounts. None of those accounts can access that page.
My account connected to GitHub can access pages outside of dev.azure.com.

The token will be expired in one year, that's a question.

If I added it a year ago, I don’t think so. I am guessing it will work.

@JounQin
Copy link
Member Author

JounQin commented Jul 11, 2022

If I added it a year ago, I don’t think so. I am guessing it will work.

OK then, let's merge and give it a try!

@JounQin JounQin merged commit 1181523 into master Jul 11, 2022
@JounQin JounQin deleted the ci/publish branch July 11, 2022 09:16
@JounQin
Copy link
Member Author

JounQin commented Jul 11, 2022

https://github.com/mdx-js/vscode-mdx/runs/7279615594?check_suite_focus=true#step:6:20

@wooorm Please help to see, maybe a new token is required for a new extension.

@JounQin
Copy link
Member Author

JounQin commented Jul 11, 2022

@wooorm
Copy link
Member

wooorm commented Jul 11, 2022

microsoft/vsmarketplace#354 (comment).

Ideas:

@JounQin
Copy link
Member Author

JounQin commented Jul 11, 2022

Perhaps we can find a workaround where we can move your extension to the unifiedjs publisher “scope”?

I hope we can do that also, but found no solution yet.

@asbjornu
Copy link

What's the current status here and how may I be of assistance? :)

@JounQin
Copy link
Member Author

JounQin commented Jul 14, 2022

What's the current status here and how may I be of assistance? :)

@asbjornu

We want to transfer my extension to unifiedjs scope, but I didn't find any solution yet, do you have any experience?

Or is that possible to contact MS service? (I'm not a native English speaker, if you could such help, that would be great!)

run: yarn --frozen-lockfile

- name: ovsx publish
uses: HaaLeo/publish-vscode-extension@v1
Copy link
Member

Choose a reason for hiding this comment

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

Are there any benefits to use this action instead of the official vsce CLI?

Also: nice that this extension is also published to the Open VSX registry.

Copy link
Member Author

Choose a reason for hiding this comment

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

It keeps usage consistency between vsce and open-vsx, I supposed?

@asbjornu
Copy link

asbjornu commented Jul 18, 2022

@JounQin, have a look at the discussion in remarkjs/vscode-remark#28. I don't remember exactly how we did it, but I think by reading the comments you should figure out what we did to move vscode-remark from @mrmlnc to remarkjs.

@wooorm
Copy link
Member

wooorm commented Jul 19, 2022

@asbjornu Back then we used the same “top-level” identifier: vscode-remark. Due to this it exists under mrmlnc and unifiedjs. This was allowed, but it is no longer allowed: #207 (comment).

@asbjornu
Copy link

Ok, then I have no idea, sorry. 🤷🏼

@remcohaszing
Copy link
Member

remcohaszing commented Jul 20, 2022

Perhaps we can try uploading the extension to the VSCode markerplace manually. Maybe some special setup is needed for the initial upload.

Alternatively we could rename the extension from vscode-mdx to mdx. There are some discussion for this as well in remarkjs/vscode-remark#66. The main reason to not do it was because it would be a churn, but given the current situation it might actually be convenient for this extension.

@wooorm
Copy link
Member

wooorm commented Jul 20, 2022

I’m quite liking releasing it as mdx!

@JounQin
Copy link
Member Author

JounQin commented Aug 5, 2022

https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx v1.0.1 is finally been released!

Thanks, @madhurivadaligithub, for help at microsoft/vsmarketplace#440

For question: Is that possible to transfer an extension to another publisher org?

The answer is YES!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Republish this as unifiedjs Extension at Open VSX Registry
5 participants