Fix/xenizo work (#350) #175
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
push: | |
branches: [development] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
env: | |
CI: false | |
strategy: | |
matrix: | |
node-version: [18.20.3] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: | | |
node --version | |
yarn --version | |
- name: set @bitregistry translation-help | |
run: yarn config set '@bit:registry' https://node.bit.dev | |
- name: yarn install | |
run: yarn install | |
- name: set max memory allocation | |
run: export NODE_OPTIONS=–max_old_space_size=4096 | |
# - name: Read version and commit sha | |
# run: | | |
# echo "::set-env name=HASH::$(echo $GITHUB_SHA | cut -c1-7)" | |
# echo "::set-env name=APP_VERSION::$(node -p -e "require('./package.json').version")" | |
# - name: Set artifact name | |
# run: echo "::set-env name=ARTIFACT_NAME::$(echo "Autographa-linux-x64-$APP_VERSION.deb")" | |
- name: package | |
id: package | |
run: | | |
yarn dist | |
- name: Cleanup artifacts | |
run: | | |
npx rimraf "dist/!(*.deb|*.AppImage|*.dmg)" | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: Scribe | |
path: dist | |
build-windows: | |
runs-on: ${{ matrix.os }} | |
env: | |
CI: false | |
strategy: | |
matrix: | |
node-version: [18.20.3] | |
os: [windows-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: | | |
node --version | |
yarn --version | |
- name: set @bitregistry translation-help | |
run: yarn config set '@bit:registry' https://node.bit.dev | |
- name: yarn install | |
run: yarn install | |
- name: set max memory allocation | |
run: set NODE_OPTIONS=–max_old_space_size=4096 | |
# - name: Read version and commit sha | |
# run: | |
# echo "::set-env name=HASH::$(node -p -e "'${{ github.sha }}'.substring(0, 7)")" | |
# echo "::set-env name=APP_VERSION::$(node -p -e "require('./package.json').version")" | |
# - name: Set x64 artifact name | |
# run: echo "::set-env name=ARTIFACT_X64::$(echo "Autographa-win-x64-${{ env.APP_VERSION }}.exe")" | |
- name: packaging | |
id: packaging | |
run: | | |
yarn dist | |
- name: Cleanup artifacts | |
if: matrix.os != 'windows-latest' | |
run: | | |
mkdir artifacts | |
mv "dist/(*.exe,*.deb,*.AppImage,*.dmg)" artifacts || true | |
- name: Cleanup artifacts Win | |
if: matrix.os == 'windows-latest' | |
run: | | |
mkdir artifacts | |
mv dist/*.exe artifacts | |
- name: Upload artifacts ${{ env.ARTIFACT_X64 }} | |
uses: actions/upload-artifact@v1 | |
with: | |
name: Scribe | |
path: artifacts | |
build-mac: | |
runs-on: ${{ matrix.os }} | |
env: | |
CI: false | |
strategy: | |
matrix: | |
node-version: [18.20.3] | |
os: [macos-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: | | |
node --version | |
yarn --version | |
- name: set @bitregistry translation-help | |
run: yarn config set '@bit:registry' https://node.bit.dev | |
- name: yarn install | |
run: yarn install | |
- name: install dmg-license | |
run: yarn add dmg-license | |
- name: set max memory allocation | |
run: export NODE_OPTIONS=–max_old_space_size=4096 | |
# - name: Read version and commit sha | |
# run: | | |
# echo "::set-env name=HASH::$(echo $GITHUB_SHA | cut -c1-7)" | |
# echo "::set-env name=APP_VERSION::$(node -p -e "require('./package.json').version")" | |
# - name: Set artifact name | |
# run: echo "::set-env name=ARTIFACT_NAME::$(echo "Autographa-mac-x64-$APP_VERSION.dmg")" | |
- name: package | |
id: package | |
run: | | |
yarn dist | |
- name: Cleanup artifacts | |
run: | | |
npx rimraf "dist/!(*.deb|*.AppImage|*.dmg)" | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: Scribe | |
path: dist |