Submit to Web Stores #1
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
| name: "Submit to Web Stores" | |
| on: | |
| workflow_run: | |
| workflows: ["Extension Release"] | |
| types: | |
| - completed | |
| jobs: | |
| submit: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Compress Repository | |
| run: | | |
| zip -r extension-source.zip . | |
| - name: Download Release Assets | |
| uses: robinraju/release-downloader@v1 | |
| with: | |
| latest: true # Download the latest release | |
| out-file-path: "assets" # Output directory for downloaded assets | |
| fileName: '*' # Download all assets | |
| - name: Find Extension Paths | |
| id: find-path | |
| # Find and output the paths to the Chrome and Firefox extension files | |
| # Required as the release actions do not support glob patterns | |
| run: | | |
| CHROME_EXT_PATH=$(find assets -name "extension-*-chrome.zip" | head -n 1) | |
| FIREFOX_EXT_PATH=$(find assets -name "extension-*-firefox.zip" | head -n 1) | |
| echo "chrome_extension_path=$CHROME_EXT_PATH" >> $GITHUB_OUTPUT | |
| echo "firefox_extension_path=$FIREFOX_EXT_PATH" >> $GITHUB_OUTPUT | |
| - name: Chrome Web Store Publish | |
| uses: browser-actions/[email protected] | |
| with: | |
| extension-id: ${{ secrets.CHROME_EXTENSION_ID }} | |
| extension-path: ${{ steps.find-path.outputs.chrome_extension_path }} | |
| oauth-client-id: ${{ secrets.OAUTH_CLIENT_ID }} | |
| oauth-client-secret: ${{ secrets.OAUTH_CLIENT_SECRET }} | |
| oauth-refresh-token: ${{ secrets.OAUTH_REFRESH_TOKEN }} | |
| - name: Firefox Web Store Publish | |
| uses: browser-actions/[email protected] | |
| with: | |
| addon-id: ${{ secrets.FIREFOX_EXTENSION_ID }} | |
| addon-path: ${{ steps.find-path.outputs.firefox_extension_path }} | |
| source-path: "extension-source.zip" | |
| approval-note: | | |
| The source code and build instructions are available at | |
| https://github.com/csfloat/extension?tab=readme-ov-file#how-to-build-release. | |
| auth-api-issuer: ${{ secrets.AUTH_API_ISSUER }} | |
| auth-api-secret: ${{ secrets.AUTH_API_SECRET }} |