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: vsix publish #246

Merged
merged 7 commits into from
Feb 19, 2024
Merged

ci: vsix publish #246

merged 7 commits into from
Feb 19, 2024

Conversation

ffMathy
Copy link
Collaborator

@ffMathy ffMathy commented Feb 18, 2024

Fixes #141

@MilanKovacic MilanKovacic self-requested a review February 18, 2024 21:24
Copy link
Contributor

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

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

Thanks!

We cannot actually test the whole thing, but I guess we could still test out packaging part without publishing by something like this:

# remove "tags" check temporary to trigger CI on this PR itself
on:
  push:
    # tags:
    #   - v*

      # ...
      # use `dryRun` and dummy `pat` to test just packaging part without publish
      - name: Publish to Open VSX Registry
        id: publishToOpenVSX
        uses: HaaLeo/publish-vscode-extension@v1
        with:
          # pat: ${{ secrets.OPEN_VSX_TOKEN }}
          pat: dummy
          dependencies: false
          dryRun: true

      - name: Publish to Visual Studio Marketplace
        uses: HaaLeo/publish-vscode-extension@v1
        with:
          # pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
          pat: dummy
          registryUrl: https://marketplace.visualstudio.com
          extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}
          dryRun: true

Maybe worth a try?

@ffMathy
Copy link
Collaborator Author

ffMathy commented Feb 19, 2024

Thanks!

We cannot actually test the whole thing, but I guess we could still test out packaging part without publishing by something like this:

# remove "tags" check temporary to trigger CI on this PR itself
on:
  push:
    # tags:
    #   - v*

      # ...
      # use `dryRun` and dummy `pat` to test just packaging part without publish
      - name: Publish to Open VSX Registry
        id: publishToOpenVSX
        uses: HaaLeo/publish-vscode-extension@v1
        with:
          # pat: ${{ secrets.OPEN_VSX_TOKEN }}
          pat: dummy
          dependencies: false
          dryRun: true

      - name: Publish to Visual Studio Marketplace
        uses: HaaLeo/publish-vscode-extension@v1
        with:
          # pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
          pat: dummy
          registryUrl: https://marketplace.visualstudio.com
          extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}
          dryRun: true

Maybe worth a try?

Great idea. Will try it out.

@ffMathy
Copy link
Collaborator Author

ffMathy commented Feb 19, 2024

Hmmm doesn't look like GitHub wants to run the new build script from a PR. Makes sense from a security perspective.

I am going to revert that commit, and then I think we just have to test on main.

This reverts commit 7b9d9d1.
Copy link
Contributor

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

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

Ah, maybe it's possible that CI added by non-admin doesn't run unless it's committed by admin to protect secret leak or something.

I guess it should be alright and @sheremet-va can tweak it later even if it fails.

@ffMathy
Copy link
Collaborator Author

ffMathy commented Feb 19, 2024

Ah, maybe it's possible that CI added by non-admin doesn't run unless it's committed by admin to protect secret leak or something.

I guess it should be alright and @sheremet-va can tweak it later even if it fails.

Yeah indeed. It was worth a shot though!

@sheremet-va
Copy link
Member

Ah, maybe it's possible that CI added by non-admin doesn't run unless it's committed by admin to protect secret leak or something.

Yes, you need special permission to use the "Release" environment.

@ffMathy
Copy link
Collaborator Author

ffMathy commented Feb 19, 2024

@sheremet-va should we then merge this, and then you folks can test directly on main until it works?

@sheremet-va
Copy link
Member

@sheremet-va should we then merge this, and then you folks can test directly on main until it works?

We can't merge this because there is a yarnlock file, and we use pnpm now.

@ffMathy
Copy link
Collaborator Author

ffMathy commented Feb 19, 2024

@sheremet-va should we then merge this, and then you folks can test directly on main until it works?

We can't merge this because there is a yarnlock file, and we use pnpm now.

Fixed ❤️

@sheremet-va sheremet-va merged commit 5868d24 into vitest-dev:main Feb 19, 2024
1 check passed
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.

Publish updates to Open VSX Registry
3 participants