Skip to content

release

release #20

Workflow file for this run

name: release
on:
push:
tags:
- '[0-9].[0-9]+.[0-9]+'
workflow_dispatch:
inputs:
platform:
description: 'Platform(amo,cws,xpi,edge)'
required: true
type: string
version:
description: 'Version'
required: true
type: string
release_tag:
description: 'Release tag name'
required: false
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Inject Env
run: |
echo "INPUT_PLATFORM=${{ github.event.inputs.platform }}" >> $GITHUB_ENV
echo "INPUT_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
- uses: pnpm/action-setup@v6
with:
version: 11
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: 'pnpm'
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Build
uses: ./.github/actions/build
- name: Pack
uses: FirefoxBar/extension-packer@action
with:
script: ${{ github.workspace }}/scripts/pack.mjs
env:
AMO_KEY: ${{ secrets.ORG_AMO_KEY }}
AMO_SECRET: ${{ secrets.ORG_AMO_SECRET }}
CWS_CLIENT_ID: ${{ secrets.ORG_CWS_CLIENT_ID }}
CWS_CLIENT_SECRET: ${{ secrets.ORG_CWS_CLIENT_SECRET }}
CWS_TOKEN: ${{ secrets.ORG_CWS_TOKEN }}
MS_CLIENT_ID: ${{ secrets.ORG_MS_CLIENT_ID }}
MS_API_KEY: ${{ secrets.ORG_MS_API_KEY }}
- name: Upload release
uses: actions/upload-artifact@v4
with:
retention-days: 7
name: release
path: temp/release
- name: Release
if: ${{ github.ref_type == 'tag' || github.event.inputs.release_tag != '' }}
uses: FirefoxBar/extension-packer@action
with:
script: ${{ github.workspace }}/scripts/release.mjs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TOKEN: ${{ secrets.ORG_EXT_API_TOKEN }}
INPUT_RELEASE_TAG: ${{ github.event.inputs.release_tag }}