Skip to content

🚀🧩 Release extensions #12

🚀🧩 Release extensions

🚀🧩 Release extensions #12

Workflow file for this run

###############################################################################
# RELEASE EXTENSIONS
###############################################################################
name: 🚀🧩 Release extensions
on:
workflow_dispatch:
inputs:
version:
description: 'Set number for release version'
type: string
required: true
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}
###############################################################################
# JOBS
###############################################################################
jobs:
release_exts:
name: 🚀🧩 Release extensions
# for the Safari build. If set to 'macos-13-xlarge' or 'macos-latest' safari build it will not be compatible with macos Intel processor
# @see https://github.com/actions/runner-images?tab=readme-ov-file#available-images
runs-on: macos-13
env:
UPDATED_VERSION: ${{ github.event.inputs.version }}
steps:
#########################################################################
# INIT
#########################################################################
- name: ⬇️ Checkout
uses: actions/checkout@v4
- name: ⬇️🟢 Setup node
uses: actions/setup-node@v3
with:
node-version: 20
- name: ⬇️🥡 Install pnpm
uses: pnpm/action-setup@v3
- name: ⬇️📦 Install dependencies
run: |
pnpm install --no-frozen-lockfile
- name: 📦📄 Get package.json data
id: pkg
run: |
echo "description=$(jq -r '.description' ./package.json)" >> $GITHUB_OUTPUT
echo "name=$(jq -r '.extra.productName' ./package.json)" >> $GITHUB_OUTPUT
echo "id=$(jq -r '.extra.id' ./package.json)" >> $GITHUB_OUTPUT
echo "exts_version=$(jq -r '.version' ./packages/exts/package.json)" >> $GITHUB_OUTPUT
echo "firefox_store_id=$(jq -r '.extra.downloadUrl.firefox.storeId' ./package.json)" >> $GITHUB_OUTPUT
echo "chrome_store_id=$(jq -r '.extra.downloadUrl.chrome.storeId' ./package.json)" >> $GITHUB_OUTPUT
echo "edge_store_id=$(jq -r '.extra.downloadUrl.edge.storeId' ./package.json)" >> $GITHUB_OUTPUT
echo "homepage=$(jq -r '.homepage' ./package.json)" >> $GITHUB_OUTPUT
echo "docs=$(jq -r '.extra.docsUrl' ./package.json)" >> $GITHUB_OUTPUT
echo "repo=$(jq -r '.repository.url' ./package.json)" >> $GITHUB_OUTPUT
#########################################################################
# BUILD
#########################################################################
- name: 🏗 Build
run: pnpm core build && pnpm exts build
#########################################################################
# GITHUB RELEASES
#########################################################################
- name: 🧩🗂️ Create Github release
uses: ncipollo/release-action@v1
with:
tag: "${{ env.UPDATED_VERSION }}"
name: '${{ steps.pkg.outputs.name }} v${{ steps.pkg.outputs.exts_version }}'
draft: false
prerelease: false
allowUpdates: true
artifacts: "packages/exts/dist/exts/*"
body: |
<p><b>Apps & Extensions releases for ${{steps.pkg.outputs.name}} v${{ env.UPDATED_VERSION }}</b></p>
<p>${{ steps.pkg.outputs.description }}</p>
🌐 [WEB](${{ steps.pkg.outputs.homepage }})
📚 [DOCUMENTATION](${{ steps.pkg.outputs.docs }})
🧩 [CHANGELOG](${{ steps.pkg.outputs.repo }}/blob/main/packages/app/CHANGELOG.md)
📜 [LICENSE](${{ steps.pkg.outputs.repo }}/blob/main/LICENSE)
#########################################################################
# PUBLISH IN FIREFOX WEB STORE
#########################################################################
- name: 🧩🦊 Upload FIREFOX extension
uses: trmcnvn/firefox-addon@v1
with:
uuid: ${{ steps.pkg.outputs.firefox_store_id }}
xpi: packages/exts/dist/exts/${{ steps.pkg.outputs.id }}-firefox.zip
manifest: packages/exts/dist/firefox/manifest.json
api-key: ${{ secrets.FIREFOX_API_KEY }}
api-secret: ${{ secrets.FIREFOX_API_SECRET }}
continue-on-error: true
#########################################################################
# PUBLISH IN CHROME WEB STORE
#########################################################################
- name: 🧩 Upload CHROME extension
uses: wdzeng/chrome-extension@v1.2.4
with:
refresh-token: '${{ secrets.CHOME_EXTENSION_REFRESH_TOKEN }}'
client-id: '${{ secrets.CHOME_EXTENSION_CLIENT_ID }}'
client-secret: '${{ secrets.CHOME_EXTENSION_CLIENT_SECRET }}'
zip-path: packages/exts/dist/exts/${{ steps.pkg.outputs.id }}-chrome.zip
extension-id: '${{steps.pkg.outputs.chrome_store_id}}'
continue-on-error: true
#########################################################################
# PUBLISH IN EDGE WEB STORE
#########################################################################
- name: 🧩 Upload EDGE extension
uses: wdzeng/edge-addon@v1.2.3
with:
product-id: ${{ steps.pkg.outputs.edge_store_id }}
client-id: ${{ secrets.EDGE_CLIENT_ID }}
client-secret: ${{ secrets.EDGE_CLIENT_SECRET }}
access-token-url: ${{ secrets.EDGE_ACCESS_TOKEN_URL }}
zip-path: packages/exts/dist/exts/${{ steps.pkg.outputs.id }}-edge.zip
continue-on-error: true
###############################################################################