mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
Fix node package ci
This commit is contained in:
56
.github/workflows/node-package.yml
vendored
56
.github/workflows/node-package.yml
vendored
@@ -8,7 +8,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prebuild:
|
prebuild:
|
||||||
name: 'Tests & Prebuild'
|
name: 'Prebuild'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -50,20 +50,6 @@ jobs:
|
|||||||
cd node
|
cd node
|
||||||
npm install --verbose
|
npm install --verbose
|
||||||
|
|
||||||
- name: Test
|
|
||||||
if: runner.os != 'Windows'
|
|
||||||
run: |
|
|
||||||
cd node
|
|
||||||
npm run test
|
|
||||||
env:
|
|
||||||
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
|
||||||
- name: Run tests on Windows, except lint
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
run: |
|
|
||||||
cd node
|
|
||||||
npm run test:mocha
|
|
||||||
env:
|
|
||||||
DCC_NEW_TMP_EMAIL: ${{ secrets.DCC_NEW_TMP_EMAIL }}
|
|
||||||
- name: Build Prebuild
|
- name: Build Prebuild
|
||||||
run: |
|
run: |
|
||||||
cd node
|
cd node
|
||||||
@@ -88,19 +74,6 @@ jobs:
|
|||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '16'
|
node-version: '16'
|
||||||
- name: get tag
|
|
||||||
id: tag
|
|
||||||
uses: dawidd6/action-get-tag@v1
|
|
||||||
continue-on-error: true
|
|
||||||
- name: Get Pullrequest ID
|
|
||||||
id: prepare
|
|
||||||
run: |
|
|
||||||
tag=${{ steps.tag.outputs.tag }}
|
|
||||||
if [ -z "$tag" ]; then
|
|
||||||
node -e "console.log('::set-output name=prid::' + '${{ github.ref }}'.split('/')[2])"
|
|
||||||
else
|
|
||||||
echo "No preview will be uploaded this time, but the $tag release"
|
|
||||||
fi
|
|
||||||
- name: System info
|
- name: System info
|
||||||
run: |
|
run: |
|
||||||
rustc -vV
|
rustc -vV
|
||||||
@@ -122,28 +95,31 @@ jobs:
|
|||||||
name: windows-latest
|
name: windows-latest
|
||||||
- shell: bash
|
- shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir prebuilds
|
mkdir node/prebuilds
|
||||||
tar -xvzf ubuntu-18.04/ubuntu-18.04.tar.gz -C prebuilds
|
tar -xvzf ubuntu-18.04/ubuntu-18.04.tar.gz -C node/prebuilds
|
||||||
tar -xvzf macos-latest/macos-latest.tar.gz -C prebuilds
|
tar -xvzf macos-latest/macos-latest.tar.gz -C node/prebuilds
|
||||||
tar -xvzf windows-latest/windows-latest.tar.gz -C prebuilds
|
tar -xvzf windows-latest/windows-latest.tar.gz -C node/prebuilds
|
||||||
tree prebuilds
|
tree node/prebuilds
|
||||||
- name: install dependencies without running scripts
|
- name: install dependencies without running scripts
|
||||||
run: |
|
run: |
|
||||||
npm install --ignore-scripts
|
npm install --ignore-scripts
|
||||||
- name: build typescript part
|
- name: build typescript part
|
||||||
run: |
|
run: |
|
||||||
npm run build:bindings:ts
|
npm run build:bindings:ts
|
||||||
|
- name: Set DELTACHAT_NODE_TAR_GZ env variable
|
||||||
|
run: |
|
||||||
|
echo "DELTACHAT_NODE_TAR_GZ=deltachat-node-${{ github.ref_name }}" >> $GITHUB_ENV
|
||||||
- name: package
|
- name: package
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
npm pack .
|
npm pack .
|
||||||
ls -lah
|
ls -lah
|
||||||
mv $(find deltachat-node-*) deltachat-node-${{ steps.prepare.outputs.prid }}.tar.gz
|
mv $(find deltachat-node-*) $DELTACHAT_NODE_TAR_GZ
|
||||||
- name: Upload Prebuild
|
- name: Upload Prebuild
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: deltachat-node.tgz
|
name: deltachat-node.tgz
|
||||||
path: deltachat-node-${{ steps.prepare.outputs.prid }}.tar.gz
|
path: $DELTACHAT_NODE_TAR_GZ
|
||||||
# Upload to download.delta.chat/node/preview/
|
# Upload to download.delta.chat/node/preview/
|
||||||
- name: Upload deltachat-node preview to download.delta.chat/node/preview/
|
- name: Upload deltachat-node preview to download.delta.chat/node/preview/
|
||||||
id: upload-preview
|
id: upload-preview
|
||||||
@@ -151,14 +127,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo -e "${{ secrets.SSH_KEY }}" >__TEMP_INPUT_KEY_FILE
|
echo -e "${{ secrets.SSH_KEY }}" >__TEMP_INPUT_KEY_FILE
|
||||||
chmod 600 __TEMP_INPUT_KEY_FILE
|
chmod 600 __TEMP_INPUT_KEY_FILE
|
||||||
scp -o StrictHostKeyChecking=no -v -i __TEMP_INPUT_KEY_FILE -P "22" -r deltachat-node-${{ steps.prepare.outputs.prid }}.tar.gz "${{ secrets.USERNAME }}"@"download.delta.chat":"/var/www/html/download/node/preview/"
|
scp -o StrictHostKeyChecking=no -v -i __TEMP_INPUT_KEY_FILE -P "22" -r $DELTACHAT_NODE_TAR_GZ "${{ secrets.USERNAME }}"@"download.delta.chat":"/var/www/html/download/node/preview/"
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: "Post links to details"
|
|
||||||
if: steps.upload-preview.outcome == 'success'
|
|
||||||
run: node ./node/scripts/postLinksToDetails.js
|
|
||||||
env:
|
|
||||||
URL: preview/deltachat-node-${{ steps.prepare.outputs.prid }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# Upload to download.delta.chat/node/
|
# Upload to download.delta.chat/node/
|
||||||
- name: Upload deltachat-node build to download.delta.chat/node/
|
- name: Upload deltachat-node build to download.delta.chat/node/
|
||||||
if: ${{ steps.tag.outputs.tag }}
|
if: ${{ steps.tag.outputs.tag }}
|
||||||
@@ -167,4 +137,4 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo -e "${{ secrets.SSH_KEY }}" >__TEMP_INPUT_KEY_FILE
|
echo -e "${{ secrets.SSH_KEY }}" >__TEMP_INPUT_KEY_FILE
|
||||||
chmod 600 __TEMP_INPUT_KEY_FILE
|
chmod 600 __TEMP_INPUT_KEY_FILE
|
||||||
scp -o StrictHostKeyChecking=no -v -i __TEMP_INPUT_KEY_FILE -P "22" -r deltachat-node-${{ steps.prepare.outputs.prid }}.tar.gz "${{ secrets.USERNAME }}"@"download.delta.chat":"/var/www/html/download/node/"
|
scp -o StrictHostKeyChecking=no -v -i __TEMP_INPUT_KEY_FILE -P "22" -r $DELTACHAT_NODE_TAR_GZ "${{ secrets.USERNAME }}"@"download.delta.chat":"/var/www/html/download/node/"
|
||||||
|
|||||||
Reference in New Issue
Block a user