Skip to content

fix: element path (#1329) #500

fix: element path (#1329)

fix: element path (#1329) #500

name: Deploy to night.test.bastyon.com
on:
workflow_dispatch:
push:
branches:
- master
jobs:
deploy-web-test:
runs-on: gui
steps:
- name: Checkout git repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Prepare
run: |
npm i
npm run build:proxy16
npm run minimize:bastyon:test -- -sha=${{ github.sha }}
- name: Copy to dest dir
run: rsync -ah --exclude={'.git','.gitignore','.github','package.json','package-lock.json','minimize.json','node_modules','.well-known','assets','proxy16','cordova','res','build'} ./ /docker/night.test/
- name: Reset nginx cache
run: /data/reset_cache.sh
shell: bash
- name: Clean work dir
run: rm -rf ./*
build-macos:
runs-on: macos-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: 16
- name: Prepare building
run: |
npm i
npm run build:proxy16
npm run dev:bastyon:test -- -sha=${{ github.sha }}
- name: Prepare for app notarization
run: |
mkdir -p ~/private_keys/
echo '${{ secrets.APPLE_API_KEY }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8
echo '${{ secrets.APPLECERT }}' | base64 -d > applecert.p12
- name: Building
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASS }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
CSC_LINK: 'file://applecert.p12'
CSC_KEY_PASSWORD: ${{ secrets.APPLECERTPWD }}
run: |
npm run distm
ls -lh ./dist/
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: macos
path: ./dist/BastyonSetup.dmg
build-unix:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Save HEAD information
run: git --no-pager log --decorate=short --pretty=oneline -n1 > head.txt
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: 16
- name: Prepare building
run: |
apt update && apt install -y binutils rpm
npm i
npm run build:proxy16
npm run dev:bastyon:test -- -sha=${{ github.sha }}
- name: Building
run: |
npm run distl
ls -lh ./dist/
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: unix
path: |
./dist/BastyonSetup.deb
./dist/BastyonSetup.rpm
./dist/Bastyon.AppImage
./head.txt
build-windows:
runs-on: windows-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: 16
- name: Prepare building
run: |
npm i
npm run build:proxy16
npm run dev:bastyon:test -- -sha=${{ github.sha }}
- name: Building
run: |
npm run dist
ls .\dist\
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: windows
path: ./dist/BastyonSetup.exe
build-android:
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Check out Git repository
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Cordova
run: |
npm i -g cordova@10
cordova --version
- name: Prepare building
run: |
npm i
npm run build:proxy16
npm run minimize:cordova:test -- -sha=${{ github.sha }}
cd ./cordova
npm i
- name: Prepare configuration
run: |
cd ./cordova
echo "${{ secrets.ANDROID_SECRET_KEY }}" | base64 -d > cert.keystore
echo "${{ secrets.ANDROID_BUILD_CONF }}" | base64 -d > build.json
echo "${{ secrets.ANDROID_FIREBASE_CONF }}" | base64 -d > google-services.json
ls -l cert.keystore
ls -l build.json
- name: Fixing Android Build Tool Issue
run: |
cd $ANDROID_HOME/build-tools/33.0.0
mv d8 dx
cd lib
mv d8.jar dx.jar
- name: Configure Cordova Plugins
run: |
cd ./cordova
npm run android-add
- name: Building
run: |
cd ./cordova
npm run android-build
- name: Rename apk binary
run: |
cd ./cordova/platforms/android/app/build/outputs/apk/release
ls -lh
mv app-release.apk Bastyon.apk
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: android
path: ./cordova/platforms/android/app/build/outputs/apk/release/Bastyon.apk
deploy-binaries:
needs: [ build-macos, build-unix, build-windows, build-android ]
runs-on: dev.pocketnet.app
steps:
- name: Download artifact
uses: actions/download-artifact@v3
- name: Copy artifacts
run: cp ./**/Bastyon* /data/dev/binaries/night.test/
- name: Copy HEAD information
run: cp ./unix/head.txt /data/dev/binaries/night.test/head.txt
- name: Clean work dir
run: rm -rf ./*