Skip to content

Generate release with assets & publish on addons stores #19

Generate release with assets & publish on addons stores

Generate release with assets & publish on addons stores #19

Workflow file for this run

name: "Generate release with assets & publish on addons stores"
on:
workflow_dispatch
jobs:
build:
environment: webstores-publishing
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Cache pnpm modules
uses: actions/[email protected]
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: latest
run_install: true
- name: Use Node.js 20.x LTS
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "pnpm"
- name: Get current package.json version
id: package-version
uses: martinbeentjes/[email protected]
- name: Build Firefox extension
run: |
pnpm plasmo build --target=firefox-mv2 --zip
mv build/firefox-mv2-prod.zip firefox-addon-${{ steps.package-version.outputs.current-version }}.zip
- name: Build Chrome(-ium) extension
run: |
pnpm plasmo build --target=chrome-mv3 --zip
mv build/chrome-mv3-prod.zip chromium-addon-${{ steps.package-version.outputs.current-version }}.zip
#- name: Browser Platform Publisher
# uses: PlasmoHQ/[email protected]
# with:
# keys: ${{ secrets.SUBMIT_KEYS }}
# verbose: true
- name: Generate release
uses: ncipollo/[email protected]
id: release-action
with:
bodyFile: "CHANGELOG.md"
commit: "master"
tag: ${{ steps.package-version.outputs.current-version }}
draft: true
generateReleaseNotes: true
makeLatest: true
token: ${{ secrets.PERSO_TOKEN }}
- name: Upload release assets
uses: AButler/[email protected]
with:
files: "firefox-addon-${{ steps.package-version.outputs.current-version }}.zip;chromium-addon-${{ steps.package-version.outputs.current-version }}.zip"
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-id: ${{ steps.release-action.outputs.id }}