Skip to content

Commit

Permalink
docs(readme): update readme with deploy explanation (SocialGouv#1256)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alezco authored Apr 14, 2021
1 parent 2f3f3bc commit fa8babd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 25 deletions.
14 changes: 0 additions & 14 deletions Dockerfile

This file was deleted.

26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,28 @@ First, prepare the build in production mode
yarn prepare-prod
```

### Preparation (code signing)
### ✍️ Preparation (code signing)

#### Windows
#### 🪟 Windows

To sign the app manually and locally, you can use the command `yarn env-linux` or `yarn env-windows` depending on your platform.
Otherwise, running a GitHub pipeline through a pull request will automatically sign Archifiltre for Windows.

#### Mac
#### 🍎 Mac

To build the app locally without signing, you can run `yarn mac-local`.
Otherwise, running a GitHub pipeline through a pull request will automatically sign Archifiltre for Mac.

Note: the file `electron/build/entitlments.mac.plist` contains the following flag: `com.apple.security.cs.allow-unsigned-executable-memory`.
To notarize the app, this flag needs to be set to `true` to activate the "Hardened Runtime", a security mecanism by Apple.

#### Linux
#### 🐧 Linux

There is no code signing on Linux, but every release has a SHA512 file corresponding to each binary. This can be used on a Linux system.

### Build the app
### 🏗️ Build the app

#### ✋ Manually

Then you can package the app for the right platform:

Expand All @@ -92,13 +94,17 @@ yarn win32-msi
yarn win64-msi
```

Or you can prepare the build and build for all four platforms with one command:
Once built, production binaries are found in the dist folder, each in their corresponding platform's subfolder.

```bash
yarn build-prod
```
#### 🪄 Automatically

Once built, production binaries are found in the dist folder, each in their corresponding platform's subfolder.
To release all the binaries and sign them:
- Go [here](https://github.com/SocialGouv/archifiltre/actions/workflows/ci.yml)
- Click the `Run workflow` menu
- Select the `master` branch
- Click `Run workflow`

This will trigger a pipeline and make all binaries and hashes available [here](https://github.com/SocialGouv/archifiltre/releases)

## ✨ Contributing

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"test-coverage": "jest \"src/.*\\.test\\.[jt]s\" --coverage",
"e2e": "jest \"tests/e2e/.*\\\\.test\\\\.[jt]s\"",
"prepare-prod": "webpack --progress --mode production --config webpack.electron-main.js && webpack --progress --mode production",
"build-prod": "yarn prepare-prod && yarn win32 && yarn win64 && yarn linux && yarn mac",
"env-linux": "cross-env-shell $(cat .env | xargs)",
"env-windows": "(for /F \"tokens=*\" %i in (.env) do set %i)",
"win32": "electron-builder --windows portable --ia32",
Expand Down

0 comments on commit fa8babd

Please sign in to comment.