Skip to content

Commit

Permalink
Merge pull request #1961 from Automattic/release/1.15.1
Browse files Browse the repository at this point in the history
Merge v1.15.1 release into master
  • Loading branch information
dmsnell authored Mar 17, 2020
2 parents 563ea5e + 72bf987 commit 0298535
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 36 deletions.
112 changes: 80 additions & 32 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ orbs:
win: circleci/[email protected]

references:
decrypt: &decrypt
run:
name: Decrypt assets
command: |
openssl aes-256-cbc -md md5 -d -in ./resources/certificates/win.p12.enc -out ./resources/certificates/win.p12 -k ${SECRETS_ENCRYPTION_KEY}
openssl aes-256-cbc -md md5 -d -in ./resources/certificates/mac.p12.enc -out ./resources/certificates/mac.p12 -k ${SECRETS_ENCRYPTION_KEY}
openssl aes-256-cbc -md md5 -d -in ./resources/secrets/config.json.enc -out ./config.json -k ${SECRETS_ENCRYPTION_KEY}
job_filters: &job_filters
branches:
ignore:
- webapp
- webapp-develop
- webapp-staging
tags:
only: /.*/
restore_nvm: &restore_nvm
restore_cache:
name: Restoring NVM cache
Expand Down Expand Up @@ -73,23 +88,33 @@ jobs:
steps:
- *install_linux_deps
- checkout
- run:
name: Decrypt assets
command: |
openssl aes-256-cbc -md md5 -d -in ./resources/certificates/win.p12.enc -out ./resources/certificates/win.p12 -k ${SECRETS_ENCRYPTION_KEY}
openssl aes-256-cbc -md md5 -d -in ./resources/certificates/mac.p12.enc -out ./resources/certificates/mac.p12 -k ${SECRETS_ENCRYPTION_KEY}
openssl aes-256-cbc -md md5 -d -in ./resources/secrets/config.json.enc -out ./config.json -k ${SECRETS_ENCRYPTION_KEY}
- *decrypt
- *restore_nvm
- *setup_nvm
- *save_nvm
- *npm_restore_cache
- *npm_install
- run: make build
- run: make lint
- run: make test
- persist_to_workspace:
root: ~/simplenote
paths: *app_cache_paths
test:
docker:
- image: circleci/node:12.14.0
shell: /bin/bash --login
working_directory: ~/simplenote
steps:
- *install_linux_deps
- checkout
- *decrypt
- *restore_nvm
- *setup_nvm
- *save_nvm
- *npm_restore_cache
- *npm_install
- run: NODE_ENV=test npm run build
- run: npm test
- run: npm run lint

linux:
docker:
Expand Down Expand Up @@ -179,18 +204,49 @@ jobs:
command: |
# Workaround for Sign Tool "private key filter" bug in Circle's Windows image.
# Ref: https://travis-ci.community/t/codesigning-on-windows/
#
# Fix: Import .p12 into the local certificate store. Sign Tool will use
#
# Fix: Import .p12 into the local certificate store. Sign Tool will use
# package.json's `certificateSubjectName` to find the imported cert.
Import-PfxCertificate -FilePath C:\Users\circleci\simplenote-electron\resources\certificates\win.p12 -CertStoreLocation Cert:\LocalMachine\Root -Password (ConvertTo-SecureString -String $env:WIN_CSC_KEY_PASSWORD -AsPlainText -Force)
make package-win32 IS_WINDOWS=true
npx electron-builder --win -p onTag
- persist_to_workspace:
root: C:\Users\circleci\simplenote-electron
paths:
- release\*.exe
- release\*.appx
- release\*.yml
windowsstore:
executor:
name: win/default
working_directory: C:\Users\circleci\simplenote-electron
environment:
CSC_LINK: ''
WIN_CSC_LINK: ''
steps:
- checkout
- attach_workspace:
at: C:\Users\circleci\simplenote-electron
- run:
name: Install make
command: cinst make
- run:
name: Install node version
command: |
$NODE_VERSION = Get-Content .\.nvmrc
nvm install $NODE_VERSION
nvm use $NODE_VERSION
- run:
name: Npm install
command: |
npm ci
- run:
name: Build windows
command: |
npx electron-builder --win --config=./electron-builder-appx.json -p onTag
- persist_to_workspace:
root: C:\Users\circleci\simplenote-electron
paths:
- release\*.appx
artifacts:
docker:
- image: buildpack-deps:trusty
Expand All @@ -206,42 +262,34 @@ workflows:
simplenote:
jobs:
- build:
filters:
branches:
ignore: webapp
tags:
only: /.*/
filters: *job_filters
- test:
filters: *job_filters
- linux:
requires:
- build
filters:
branches:
ignore: webapp
tags:
only: /.*/
filters: *job_filters
- mac:
requires:
- build
filters:
branches:
ignore: webapp
tags:
only: /.*/
filters: *job_filters
- windows:
requires:
- build
filters: *job_filters
- windowsstore:
requires:
- build
filters:
branches:
ignore: webapp
only:
- none
tags:
only: /.*/
- artifacts:
requires:
- linux
- mac
- windows
filters:
branches:
ignore: webapp
tags:
only: /.*/
- windowsstore
filters: *job_filters
6 changes: 6 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [v1.15.1]

### Other Changes

- Fix application signing to generate proper appx for Windows Store [#1960](https://github.com/Automattic/simplenote-electron/pull/1960)

## [v1.15.0]

### Enhancements
Expand Down
13 changes: 11 additions & 2 deletions electron-builder-appx.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"productName": "Simplenote",
"appId": "com.automattic.simplenote",
"directories": {
"output": "release",
"buildResources": "resources"
},
"files": ["desktop", "dist", "shared"],
"win": {
"icon": "resources/images/simplenote.ico",
"target": [
{
"target": "appx"
Expand All @@ -12,7 +20,8 @@
"publisher": "CN=E2E5A157-746D-4B04-9116-ABE5CB928306",
"publisherDisplayName": "Automattic",
"backgroundColor": "transparent",
"artifactName": "Simplenote-win-${version}-${arch}.${ext}"
"artifactName": "Simplenote-win-store-${version}-${arch}.${ext}"
},
"extends": "./electron-builder.json"
"afterSign": "./after_sign_hook.js",
"afterAllArtifactBuild": "./after_sign_hook.js"
}
4 changes: 4 additions & 0 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
{
"target": "nsis",
"arch": ["ia32", "x64"]
},
{
"target": "appx",
"arch": ["ia32", "x64"]
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"email": "[email protected]"
},
"productName": "Simplenote",
"version": "1.15.0",
"version": "1.15.1",
"main": "desktop/index.js",
"license": "GPL-2.0",
"homepage": "https://simplenote.com",
Expand Down

0 comments on commit 0298535

Please sign in to comment.