-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (70 loc) · 2.09 KB
/
Copy pathrelease.yml
File metadata and controls
74 lines (70 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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 }}