2021-12-13 10:50:32 +00:00
|
|
|
name: Publish
|
|
|
|
|
|
|
|
on: workflow_dispatch
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-macos:
|
2021-12-13 13:13:22 +00:00
|
|
|
runs-on: macos-11
|
2021-12-13 10:50:32 +00:00
|
|
|
steps:
|
|
|
|
- name: Setup node
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
2021-12-13 13:13:22 +00:00
|
|
|
node-version: '16.13.1'
|
2021-12-13 10:50:32 +00:00
|
|
|
|
|
|
|
- name: Change yarn version
|
|
|
|
run: yarn set version 1.22.17
|
|
|
|
|
|
|
|
- name: Checkout Books
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: main
|
|
|
|
|
|
|
|
- name: Checkout FrappeJS
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: 'frappe/frappejs'
|
|
|
|
path: framework
|
|
|
|
|
|
|
|
- name: Setup FrappeJS
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/framework
|
|
|
|
yarn
|
|
|
|
yarn link
|
|
|
|
|
|
|
|
- name: Setup Books
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/main
|
2022-01-13 07:11:44 +00:00
|
|
|
yarn upgrade frappejs
|
2021-12-13 10:50:32 +00:00
|
|
|
yarn link frappejs
|
|
|
|
|
|
|
|
- name: Run build
|
|
|
|
env:
|
|
|
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
|
|
|
APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }}
|
|
|
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
|
|
|
CSC_LINK: ${{ secrets.CSC_LINK }}
|
|
|
|
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
|
|
|
|
CSC_IDENTITY_AUTO_DISCOVERY: true
|
|
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
|
|
APPLE_NOTARIZE: 1
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/main
|
|
|
|
yarn electron:build --mac --publish always
|
2022-01-13 07:32:24 +00:00
|
|
|
|
|
|
|
- name: Tar files
|
|
|
|
run: tar -cvf dist-macOS.tar $GITHUB_WORKSPACE/main/dist_electron
|
|
|
|
|
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: dist-macOS
|
|
|
|
path: dist-macOS.tar
|
2021-12-13 10:50:32 +00:00
|
|
|
|
|
|
|
build-linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Setup node
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
2021-12-13 13:13:22 +00:00
|
|
|
node-version: '16.13.1'
|
2021-12-13 10:50:32 +00:00
|
|
|
|
|
|
|
- name: Checkout Books
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: main
|
|
|
|
|
|
|
|
- name: Checkout FrappeJS
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: 'frappe/frappejs'
|
|
|
|
path: framework
|
|
|
|
|
|
|
|
- name: Setup FrappeJS
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/framework
|
|
|
|
yarn
|
|
|
|
yarn link
|
|
|
|
|
|
|
|
- name: Setup Books
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/main
|
2022-01-13 07:11:44 +00:00
|
|
|
yarn upgrade frappejs
|
2021-12-13 10:50:32 +00:00
|
|
|
yarn link frappejs
|
|
|
|
|
|
|
|
- name: Run build
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/main
|
|
|
|
yarn electron:build --linux --publish always
|
|
|
|
|
2022-01-13 07:32:24 +00:00
|
|
|
- name: Tar files
|
|
|
|
run: tar -cvf dist-linux.tar $GITHUB_WORKSPACE/main/dist_electron
|
|
|
|
|
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: dist-linux
|
|
|
|
path: dist-linux.tar
|
|
|
|
|
2021-12-13 10:50:32 +00:00
|
|
|
build-windows:
|
2022-01-14 10:48:27 +00:00
|
|
|
runs-on: windows-2019
|
2021-12-13 12:36:47 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
2021-12-13 10:50:32 +00:00
|
|
|
steps:
|
|
|
|
- name: Setup node
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
2021-12-13 13:13:22 +00:00
|
|
|
node-version: '16.13.1'
|
2021-12-13 10:50:32 +00:00
|
|
|
|
|
|
|
- name: Checkout Books
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: main
|
|
|
|
|
|
|
|
- name: Checkout FrappeJS
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: 'frappe/frappejs'
|
|
|
|
path: framework
|
|
|
|
|
|
|
|
- name: Setup FrappeJS
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/framework
|
|
|
|
yarn
|
|
|
|
yarn link
|
|
|
|
|
|
|
|
- name: Setup Books
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/main
|
2022-01-13 07:11:44 +00:00
|
|
|
yarn upgrade frappejs
|
2021-12-13 10:50:32 +00:00
|
|
|
yarn link frappejs
|
|
|
|
|
|
|
|
- name: Run build
|
|
|
|
env:
|
|
|
|
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
|
|
|
|
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
|
|
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/main
|
|
|
|
yarn electron:build --win --publish always
|
2022-01-13 07:32:24 +00:00
|
|
|
|
|
|
|
- name: Tar files
|
2022-01-14 12:09:59 +00:00
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE/main
|
|
|
|
tar -cvf dist-windows.tar dist_electron
|
|
|
|
mv dist-windows.tar ../
|
2022-01-13 07:32:24 +00:00
|
|
|
|
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: dist-windows
|
|
|
|
path: dist-windows.tar
|