Skip to content

Commit

Permalink
v1.4.1 - Upgrade dependencies, add version-file param
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgv committed Feb 27, 2022
1 parent c258cff commit 594bd2f
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 95 deletions.
6 changes: 1 addition & 5 deletions __tests__/__snapshots__/main.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`happy path 1`] = `
"No zip for chrome provided
No zip for firefox provided
No zip for edge provided
No zip for opera provided
::debug::$schema,chrome,firefox,edge,opera
"::debug::$schema,chrome,firefox,edge,opera
"
`;
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
artifact:
required: false
description: "The plugin zip artifact to be published."
version-file:
required: false
description: "The path to a json file with a version field, default to package.json."
runs:
using: "node16"
main: "dist/index.js"
144 changes: 72 additions & 72 deletions dist/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@plasmo/bpp",
"version": "1.4.0",
"version": "1.4.1",
"private": true,
"description": "Browser Plugin Publisher",
"main": "lib/main.js",
Expand Down Expand Up @@ -30,11 +30,11 @@
"license": "MIT",
"dependencies": {
"@actions/core": "1.6.0",
"@plasmo-corp/bms": "1.0.0"
"@plasmo-corp/bms": "1.3.0"
},
"devDependencies": {
"@plasmo-corp/rps": "1.1.0",
"@jest/globals": "27.5.1",
"@plasmo-corp/rps": "1.1.0",
"@trivago/prettier-plugin-sort-imports": "3.2.0",
"@types/node": "17.0.21",
"@typescript-eslint/eslint-plugin": "5.12.1",
Expand Down
26 changes: 13 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ 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("artifact")
const versionFile = getInput("version-file")

const browserEntries = Object.keys(keys).filter((browser) =>
supportedBrowserSet.has(browser as BrowserName)
Expand All @@ -46,11 +47,14 @@ async function run(): Promise<void> {
// Enrich keys with zip artifact if needed
browserEntries.forEach((browser: BrowserName) => {
if (!keys[browser].zip) {
info(`No zip for ${browser} provided`)
if (!artifact) {
warning(`🤖 SKIP: No artifact available to submit for ${browser}`)
} else {
keys[browser].zip = artifact
}
keys[browser].zip = artifact
}
if (!keys[browser].versionFile) {
keys[browser].versionFile = versionFile
}
})

Expand Down

0 comments on commit 594bd2f

Please sign in to comment.