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

feat: add CI for publishing chrome extension #1568

Merged
merged 21 commits into from
Dec 10, 2024
Merged

feat: add CI for publishing chrome extension #1568

merged 21 commits into from
Dec 10, 2024

Conversation

YunFeng0817
Copy link
Member

@YunFeng0817 YunFeng0817 commented Sep 13, 2024

Changes:

  1. Because we are upgrading svelte, the link for the rrweb-player css file needs to be updated.
  2. Remove a permission that is not used in the extension
  3. Add a CI to automatically publish the extension to the chrome web store
  4. Improve conversion of rrweb version to chrome extension version

Copy link

changeset-bot bot commented Sep 13, 2024

🦋 Changeset detected

Latest commit: d09f561

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

This PR includes changesets to release 19 packages
Name Type
@rrweb/web-extension Patch
rrweb Patch
rrweb-snapshot Patch
rrdom Patch
rrdom-nodejs Patch
rrweb-player Patch
@rrweb/all Patch
@rrweb/replay Patch
@rrweb/record Patch
@rrweb/types Patch
@rrweb/packer Patch
@rrweb/utils Patch
rrvideo Patch
@rrweb/rrweb-plugin-console-record Patch
@rrweb/rrweb-plugin-console-replay Patch
@rrweb/rrweb-plugin-sequential-id-record Patch
@rrweb/rrweb-plugin-sequential-id-replay Patch
@rrweb/rrweb-plugin-canvas-webrtc-record Patch
@rrweb/rrweb-plugin-canvas-webrtc-replay 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

@YunFeng0817 YunFeng0817 marked this pull request as ready for review December 9, 2024 06:11
@YunFeng0817 YunFeng0817 requested a review from Juice10 December 9, 2024 06:12
Comment on lines 22 to 29
- uses: mnao305/[email protected]
with:
extension-id: 'pdaldeopoccdhlkabbkcjmecmmoninhe'
file-path: ./packages/web-extension/dist/chrome.zip
client-id: ${{ secrets.CWS_CLIENT_ID }}
client-secret: ${{ secrets.CWS_CLIENT_SECRET }}
refresh-token: ${{ secrets.CWS_REFRESH_TOKEN }}
publish: true
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I can tell from here: https://github.com/changesets/action?tab=readme-ov-file#custom-publishing

You need to move the following code (including the new if statement) to .github/workflows/release.yml:

      - uses: mnao305/[email protected]
        if: steps.changesets.outputs.hasChangesets == 'false'
        with:
          extension-id: 'pdaldeopoccdhlkabbkcjmecmmoninhe'
          file-path: ./packages/web-extension/dist/chrome.zip
          client-id: ${{ secrets.CWS_CLIENT_ID }}
          client-secret: ${{ secrets.CWS_CLIENT_SECRET }}
          refresh-token: ${{ secrets.CWS_REFRESH_TOKEN }}
          publish: true

@@ -31,7 +31,7 @@ export default function Player() {

const linkEl = document.createElement('link');
linkEl.href =
'https://cdn.jsdelivr.net/npm/rrweb-player@latest/dist/style.css';
'https://cdn.jsdelivr.net/npm/rrweb-player@alpha/dist/style.min.css';
Copy link
Contributor

Choose a reason for hiding this comment

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

This is going to break once we go out of alpha, maybe you could pull in the version number directly from package.json we do in packages/web-extension/vite.config.ts

@YunFeng0817 YunFeng0817 requested a review from Juice10 December 10, 2024 08:29
@Juice10 Juice10 merged commit 4fd55c0 into master Dec 10, 2024
11 checks passed
@Juice10 Juice10 deleted the extension branch December 10, 2024 09:44
@mohammedzamakhan
Copy link

How would I even use this fix in my chrome extension that uses rrweb package? This fix only seems to fix chrome extension for this repo!!

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.

3 participants