Skip to content

Commit

Permalink
Merge pull request #94 from DanielSinclair/@daniel/firefox-source
Browse files Browse the repository at this point in the history
firefox source code submission
  • Loading branch information
louisgv authored Nov 13, 2024
2 parents 545d8cd + ca76cbf commit 1e53135
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ Each browser option is made of the following:

* `versionFile`: Relative path to a json file which has a version field. Defaults to package.json

* `sourceZip`: The zip file containing the source code for Firefox submissions.

* `source` and `sourceFile`: Aliases for the `sourceZip` property.

* `notes`: [Edge Only] Provide notes for certification to the Edge Add-ons reviewers.

The final json might look like this:
Expand All @@ -76,6 +80,7 @@ The final json might look like this:
},
"firefox": {
"file": "firefox_addon.xpi",
"sourceFile": "source.zip",
"extId": "aaaaaaa-aaaa-bbbb-cccc-dddddddddddd",
"apiKey": "ab214c4d",
"apiSecret": "e%f253^gh"
Expand Down Expand Up @@ -117,6 +122,10 @@ Specifying options here will **override** those in the keys file.
opera-file/chrome-file/firefox-file/edge-file:
required: false
description: "The file to be published to a specific store."
source:
alias: [source-zip, source-file]
required: false
description: "The extension source zip artifact for Firefox submissions."
notes:
alias: [edge-notes]
required: false
Expand Down
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ inputs:
notes:
required: false
description: "A release note cataloging changes. (Edge only)"
source:
required: false
description: "The extension source zip file."
source-zip:
required: false
description: "This is an alias to source argument."
source-file:
required: false
description: "This is an alias to source argument."
edge-notes:
required: false
description: "This is an alias to notes argument."
Expand Down
2 changes: 1 addition & 1 deletion packages/bms
7 changes: 7 additions & 0 deletions packages/bpp/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ async function run(): Promise<void> {
const keys: Keys = JSON.parse(getInput("keys", { required: true }))
// Path to the zip file to be deployed
const artifact = getInput("file") || getInput("zip") || getInput("artifact")
// Path to the source zip file for firefox submissions
const source = getInput("source") || getInput("sourceFile") || getInput("sourceZip")

const versionFile = getInput("version-file")

const edgeNotes = getInput("notes") || getInput("edge-notes")
Expand Down Expand Up @@ -86,6 +89,10 @@ async function run(): Promise<void> {
throw new Error("No artifact found for deployment")
}

if (keys.firefox && source) {
keys.firefox.sourceZip = source
}

if (keys.edge && edgeNotes) {
keys.edge.notes = edgeNotes
}
Expand Down

0 comments on commit 1e53135

Please sign in to comment.