-
Notifications
You must be signed in to change notification settings - Fork 1
Prepare chrome extension deployment (#3) #4
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4fbbff4
Add build and deploy workflows for browser extension (#3)
MartinGroscheTT fe11c67
Fix environment variable references (#3)
MartinGroscheTT f49f6ff
Refactor build workflow to set up environment variable for browser pl…
MartinGroscheTT 0bf877b
Refactor environment variable setup for browser platform in build wor…
MartinGroscheTT 8f0afda
Fix syntax error in environment variable print statement in build wor…
MartinGroscheTT f14b870
Refactor browser platform handling (#3)
MartinGroscheTT d6a8991
Add integration section to Developer Guide and clarify build folder n…
MartinGroscheTT 8bf71b9
Add placeholder for Firefox Add-on publishing in deploy workflow (#3)
MartinGroscheTT f6244cf
Update documentation links and enhance extension description for clar…
MartinGroscheTT 2bc6292
Add review notes (#3)
MartinGroscheTT a29fcf0
Provide screenshots (#3)
MartinGroscheTT 9b8eba7
Format file (#3)
MartinGroscheTT 6be007a
Update version and fix typo (#3)
MartinGroscheTT aea185a
Provide an installation guide for chrome (#3)
MartinGroscheTT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| name: Deploy Browser Extension | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'ecu-test-diff-[0-9]+.[0-9]+.[0-9]+' | ||
| release: | ||
| types: [published] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| version-check: | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| startsWith(github.ref, 'refs/tags/ecu-test-diff-') || | ||
| github.event_name == 'release' | ||
| outputs: | ||
| proceed: ${{ steps.version-check.outputs.proceed }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Check tag matches manifest version | ||
| id: version-check | ||
| run: | | ||
| sudo apt-get update -y | ||
| sudo apt-get install -y jq | ||
|
|
||
| # Tag ref of release refs/tags/<tag_name> as well | ||
| TAG_VERSION="${GITHUB_REF#refs/tags/ecu-test-diff-}" | ||
| MANIFEST_VERSION=$(jq -r '.version' static/manifest.json) | ||
| echo "Tag version: $TAG_VERSION" | ||
| echo "Manifest version: $MANIFEST_VERSION" | ||
|
|
||
| if [ "$TAG_VERSION" != "$MANIFEST_VERSION" ]; then | ||
| echo "❌ Tag version ($TAG_VERSION) does not match manifest version ($MANIFEST_VERSION)." | ||
| echo "proceed=false" >> $GITHUB_OUTPUT | ||
| exit 1 | ||
| elif [[ "{{ github.event_name }}" == "release" ]]; then | ||
| ]] | ||
| fi | ||
|
|
||
| echo "✅ Tag version matches manifest version." | ||
| echo "proceed=true" >> $GITHUB_OUTPUT | ||
|
|
||
| build: | ||
| needs: version-check | ||
| if: needs.version-check.outputs.proceed == 'true' | ||
| uses: ./.github/workflows/build.yml | ||
|
|
||
| publish: | ||
| needs: [version-check, build] | ||
| if: ${{ github.env.DEPLOYMENT == 'True' }} | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| browser: ['chrome'] # After supporting multiple browsers, this will be changed to ["chrome", "firefox"] | ||
| steps: | ||
| - name: Get artifact from build job | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.browser }}-extension | ||
| - name: Publish to Firefox Add-on | ||
| if: ${{ matrix.browser == 'firefox' }} | ||
| run: echo "Publishing to Firefox Add-on is not implemented yet." | ||
| - name: Publish to Chrome Web Store | ||
| if: ${{ matrix.browser == 'chrome' }} | ||
| uses: mnao305/[email protected] | ||
| with: | ||
| file-path: ${{ matrix.browser }}-extension.zip | ||
| extension-id: ${{ secrets.EXTENSION_ID }} | ||
| client-id: ${{ secrets.CLIENT_ID }} | ||
| client-secret: ${{ secrets.CLIENT_SECRET }} | ||
| refresh-token: ${{ secrets.REFRESH_TOKEN }} # or "trustedTesters" for internal testing | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.