diff --git a/.github/workflows/publich-edge.yml b/.github/workflows/publich-edge.yml new file mode 100644 index 000000000..a62f822fb --- /dev/null +++ b/.github/workflows/publich-edge.yml @@ -0,0 +1,32 @@ +name: Publish to Edge Addon Store +on: + push: + branches: + - "release" +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Add release branch + run: | + git fetch -a + git branch release origin/release + - name: Setup NodeJS + uses: actions/setup-node@v4 + with: + node-version: "v20.11.0" + - name: Install dependencies + run: npm install + - name: Build + run: npm run build + - name: Upload + uses: wdzeng/edge-addon@v2 + with: + zip-path: market_packages/target.zip + product-id: 2a99ae83-5ec8-4ad2-aa63-9a276fc708ce + client-id: ${{ secrets.EDGE_CLIENT_ID }} + api-key: ${{ secrets.EDGE_API_KEY}} + upload-only: false diff --git a/.github/workflows/publish-chrome.yml b/.github/workflows/publish-chrome.yml new file mode 100644 index 000000000..16e98a4cb --- /dev/null +++ b/.github/workflows/publish-chrome.yml @@ -0,0 +1,33 @@ +name: Publish to Chrome Webstore +on: + push: + branches: + - "release" +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Add release branch + run: | + git fetch -a + git branch release origin/release + - name: Setup NodeJS + uses: actions/setup-node@v4 + with: + node-version: "v20.11.0" + - name: Install dependencies + run: npm install + - name: Build + run: npm run build + - name: Upload + uses: mnao305/chrome-extension-upload@v5.0.0 + with: + file-path: market_packages/target.zip + extension-id: dkdhhcbjijekmneelocdllcldcpmekmm + client-id: ${{ secrets.CHROME_CLIENT_ID }} + client-secret: ${{ secrets.CHROME_CLIENT_SECRET }} + refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }} + publish: true diff --git a/.github/workflows/publish-firefox.yml b/.github/workflows/publish-firefox.yml new file mode 100644 index 000000000..4546aa3c7 --- /dev/null +++ b/.github/workflows/publish-firefox.yml @@ -0,0 +1,31 @@ +name: Publish to Firefox Addon Store +on: + push: + branches: + - "release" +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Add release branch + run: | + git fetch -a + git branch release origin/release + - name: Setup NodeJS + uses: actions/setup-node@v4 + with: + node-version: "v20.11.0" + - name: Install dependencies + run: npm install + - name: Build + run: npm run build:firefox + - name: Upload to Firefox addon store + uses: wdzeng/firefox-addon@v1 + with: + addon-guid: "{7b312f5e-9680-436b-acc1-9b09f60e8aaa}" + xpi-path: market_packages/target.firefox.zip + jwt-issuer: ${{ secrets.FIREFOX_JWD_ISSUER }} + jwt-secret: ${{ secrets.FIREFOX_JWD_SECRET }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 0a7cfecfc..000000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Publish to extension/addon store -on: - push: - branches: - - "release" -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - uses: actions/setup-node@v1 - with: - node-version: "v20.11.0" - - run: npm install - - name: Build for MV3 - run: npm run build - - name: Build for Firefox - run: npm run build:firefox - - name: Upload to chrome webstore - uses: mnao305/chrome-extension-upload@v5.0.0 - with: - file-path: market_packages/target.zip - extension-id: dkdhhcbjijekmneelocdllcldcpmekmm - client-id: ${{ secrets.CHROME_CLIENT_ID }} - client-secret: ${{ secrets.CHROME_CLIENT_SECRET }} - refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }} - # publish: false # Not to publish - - name: Upload to Edge addon store - uses: wdzeng/edge-addon@v2 - with: - zip-path: market_packages/target.zip - product-id: 2a99ae83-5ec8-4ad2-aa63-9a276fc708ce - client-id: ${{ secrets.EDGE_CLIENT_ID }} - api-key: ${{ secrets.EDGE_API_KEY}} - upload-only: true # Not to publish - - name: Upload to Firefox addon store - uses: cardinalby/webext-buildtools-firefox-addons-action@v1 - with: - extensionId: '{7b312f5e-9680-436b-acc1-9b09f60e8aaa}' - zipFilePath: market_packages/target.firefox.zip - jwtIssuer: ${{ secrets.FIREFOX_API_KEY }} - jwtSecret: ${{ secrets.FIREFOX_API_SECRET }} \ No newline at end of file