Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ajyey committed Jun 24, 2024
2 parents 22a9d2f + e48611f commit 8c226c0
Show file tree
Hide file tree
Showing 6 changed files with 3,385 additions and 57 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
cache: 'yarn'
- name: Installing dependencies
run: yarn install --frozen-lockfile
- name: Verify patch application
run: |
grep -q "extensionId:" node_modules/semantic-release-firefox-add-on/src/constants.js || echo "Patch applied successfully"
- name: Building extension
run: yarn build
- name: Releasing
Expand All @@ -46,4 +49,6 @@ jobs:
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
GOOGLE_REFRESH_TOKEN: ${{ secrets.GOOGLE_REFRESH_TOKEN }}
GITHUB_REF: ${{ github.ref }}
FIREFOX_API_KEY: ${{ secrets.FIREFOX_API_KEY }}
FIREFOX_SECRET_KEY: ${{ secrets.FIREFOX_SECRET_KEY }}
run: npx semantic-release
28 changes: 24 additions & 4 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// .releaserc.js
const currentBranch =
process.env.GITHUB_REF && process.env.GITHUB_REF.replace('refs/heads/', '');

Expand All @@ -9,11 +8,17 @@ const generatePluginsConfig = () => {
{
preset: 'angular',
releaseRules: [
{ scope: 'no-release', release: false },
{ type: 'build', scope: 'major', release: 'major' },
{ type: 'build', scope: 'minor', release: 'minor' },
{ type: 'build', scope: 'patch', release: 'patch' },
{ type: 'chore', scope: 'deps', release: 'patch' },
{ type: 'feat', scope: 'major', release: 'major' },
{ type: 'refactor', release: 'patch' },
{ type: 'refactor', scope: 'types', release: 'minor' },
{ type: 'feat', scope: 'major', release: 'major' },
{ scope: 'no-release', release: false }
{ type: 'release', scope: 'major', release: 'major' },
{ type: 'release', scope: 'minor', release: 'minor' },
{ type: 'release', scope: 'patch', release: 'patch' }
]
}
],
Expand Down Expand Up @@ -44,6 +49,16 @@ const generatePluginsConfig = () => {
target: currentBranch === 'main' ? 'default' : 'local' // only publish to chrome store on main branch
}
],
[
'semantic-release-firefox-add-on',
{
extensionId: '{c48d361c-1173-11ee-be56-0242ac120002}',
targetXpi: 'masked-email-manager_v${nextRelease.version}_firefox.xpi',
sourceDir: 'dist-firefox',
channel: currentBranch === 'main' ? 'listed' : 'unlisted', // only publish to firefox store on main branch
artifactsDir: 'artifacts'
}
],
[
'@semantic-release/github',
{
Expand All @@ -52,6 +67,11 @@ const generatePluginsConfig = () => {
path: 'masked-email-manager_*_chrome.zip',
name: 'masked-email-manager_v${nextRelease.version}_chrome.zip',
label: 'Chrome Extension v${nextRelease.version}'
},
{
path: 'artifacts/masked-email-manager_v${nextRelease.version}_firefox.xpi',
name: 'masked-email-manager_v${nextRelease.version}_firefox.xpi',
label: 'Firefox Add-on v${nextRelease.version}'
}
]
}
Expand All @@ -77,4 +97,4 @@ export default {
},
],
plugins: generatePluginsConfig(),
};
};
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [1.3.9-beta.3](https://github.com/ajyey/masked-email-manager/compare/v1.3.9-beta.2...v1.3.9-beta.3) (2024-06-24)

## [1.3.9-beta.2](https://github.com/ajyey/masked-email-manager/compare/v1.3.9-beta.1...v1.3.9-beta.2) (2024-06-24)

## [1.3.9-beta.1](https://github.com/ajyey/masked-email-manager/compare/v1.3.8...v1.3.9-beta.1) (2024-06-24)

## [1.3.8](https://github.com/ajyey/masked-email-manager/compare/v1.3.7...v1.3.8) (2024-06-24)

## [1.3.7](https://github.com/ajyey/masked-email-manager/compare/v1.3.6...v1.3.7) (2024-06-15)
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "masked-email-manager",
"displayName": "Masked Email Manager",
"description": "A web extension to manage your Fastmail masked emails",
"version": "1.3.8",
"version": "1.3.9-beta.3",
"license": "MIT",
"repository": {
"type": "git",
Expand All @@ -19,7 +19,8 @@
"dev": "nodemon",
"semantic-release": "semantic-release",
"upgrade-packages": "npx npm-check-updates -u && yarn",
"update-version": "node utils/update-version.js"
"update-version": "node utils/update-version.js",
"postinstall": "patch-package"
},
"dependencies": {
"fastmail-masked-email": "^2.1.9",
Expand Down Expand Up @@ -60,12 +61,15 @@
"husky": "^9.0.11",
"nodemon": "^3.1.4",
"npm-run-all": "^4.1.5",
"patch-package": "^8.0.0",
"postcss": "^8.4.38",
"postinstall-postinstall": "^2.1.0",
"prettier": "^3.3.2",
"rimraf": "^5.0.7",
"run-script-os": "^1.1.6",
"semantic-release": "^24.0.0",
"semantic-release-chrome": "^3.2.0",
"semantic-release-firefox-add-on": "^0.2.8",
"tailwindcss": "^3.4.4",
"ts-node": "^10.9.2",
"typescript": "^5.5.2",
Expand Down
33 changes: 33 additions & 0 deletions patches/semantic-release-firefox-add-on+0.2.8.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/node_modules/semantic-release-firefox-add-on/src/constants.js b/node_modules/semantic-release-firefox-add-on/src/constants.js
index c5dea36..2e34ade 100644
--- a/node_modules/semantic-release-firefox-add-on/src/constants.js
+++ b/node_modules/semantic-release-firefox-add-on/src/constants.js
@@ -11,8 +11,6 @@ const defaultOptions = {
}

const requiredOptions = {
- extensionId:
- 'Omitting this would create a new extension instead of a new version.',
targetXpi:
'Omitting this would leave the xpi file unnamed when it is returned from mozilla.',
}
diff --git a/node_modules/semantic-release-firefox-add-on/src/publish.js b/node_modules/semantic-release-firefox-add-on/src/publish.js
index ad0f63d..6c3ce35 100644
--- a/node_modules/semantic-release-firefox-add-on/src/publish.js
+++ b/node_modules/semantic-release-firefox-add-on/src/publish.js
@@ -16,7 +16,6 @@ const publish = async options => {
// the console which will lead to the validation page which should contain
// detailed reasons why the extension was rejected
const {
- extensionId,
artifactsDir,
channel,
sourceDir,
@@ -46,7 +45,6 @@ const publish = async options => {
apiSecret: FIREFOX_SECRET_KEY,
artifactsDir,
channel,
- id: extensionId,
sourceDir,
},
{ signAddon },
Loading

0 comments on commit 8c226c0

Please sign in to comment.