Files
mue/.github/workflows/submit.yml

58 lines
1.5 KiB
YAML

name: Submit to Browser Stores
on:
release:
types: [released]
workflow_dispatch:
inputs:
tag:
description: "Release tag to re-submit (e.g. v7.6.1)"
required: true
permissions:
contents: read
jobs:
submit:
runs-on: ubuntu-latest
environment: production
steps:
- name: Resolve tag and version
id: tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
TAG="${{ github.event.inputs.tag }}"
else
TAG="${{ github.event.release.tag_name }}"
fi
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "version=${TAG#v}" >> $GITHUB_OUTPUT
- name: Download release ZIPs
run: |
mkdir -p dist
gh release download "${{ steps.tag.outputs.tag }}" \
--pattern "chrome-*.zip" \
--dir ./dist
env:
GH_TOKEN: ${{ github.token }}
- name: Verify ZIP
run: |
ls -la dist/
test -f "dist/chrome-${{ steps.tag.outputs.version }}.zip" || \
{ echo "chrome ZIP not found"; exit 1; }
- name: Submit to Chrome Web Store
uses: PlasmoHQ/bpp@v3
with:
keys: ${{ secrets.SUBMIT_KEYS }}
chrome-zip: dist/chrome-${{ steps.tag.outputs.version }}.zip
- name: Summary
if: always()
run: |
echo "## Store Submission: ${{ steps.tag.outputs.tag }}" >> $GITHUB_STEP_SUMMARY
echo "- Chrome Web Store (listed)" >> $GITHUB_STEP_SUMMARY