Merge branch 'feat/Layers' into stable_fixes #1508
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
name: 🦇 Nightly build | |
on: | |
push: | |
branches: | |
- "**" | |
tags-ignore: | |
- "*" | |
jobs: | |
profile-cloud-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Profile Cloud repository | |
uses: actions/checkout@v3 | |
with: | |
ssh-key: ${{ secrets.PROFILE_CLOUD_KEY }} | |
repository: intechstudio/profile-cloud | |
fetch-depth: 0 | |
- name: Checkout latest tag | |
run: git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) | |
- name: Create public env file | |
run: | | |
touch .env | |
echo PUBLIC_COMMIT_HASH=$(git log --format="%h" -n 1) >> .env | |
echo PUBLIC_APP_ENV=development >> .env | |
echo PUBLIC_GOOGLE_CLIENT_ID=${{ secrets.PUBLIC_GOOGLE_CLIENT_ID_DEV }} >> .env | |
echo PUBLIC_CREATION_DATE=$(git log --format="%cd" --date=format:'%Y-%m-%d' -1) >> .env | |
- name: Build profile cloud project | |
run: npm ci && npm run build | |
- name: Upload profile cloud folder | |
uses: actions/upload-artifact@v4 | |
with: | |
name: profile-cloud | |
path: public/ | |
retention-days: 1 | |
matrix-build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
needs: profile-cloud-build | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: "" | |
submodules: true | |
- name: Setup NodeJs | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18.16.1" | |
- name: Download profile cloud artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: profile-cloud | |
path: profile-cloud/ | |
# WORKFLOW_NAME is used for productName extension in electron-builder.js | |
- name: Set Env | |
shell: bash | |
run: | | |
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
echo "WORKFLOW_NAME=nightly" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: npm i | |
- name: Update package.json | |
run: node ./build-scripts/nightly-packageModifier.js | |
- name: Build | |
run: npm run export:nightly | |
if: ${{ always() }} | |
env: | |
# gh repo token | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# windows Code signing | |
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} | |
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} | |
# Apple ID | |
APPLE_ID: ${{secrets.APPLE_ID}} | |
APPLE_TEAM_ID: ${{secrets.APPLE_TEAM_ID}} | |
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}} | |
# macOS Code signing | |
CSC_LINK: ${{ secrets.MAC_CSC_LINK }} | |
CSC_KEY_PASSWORD: ${{ secrets.MAC_CSC_KEY_PASSWORD }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-nightly | |
path: build/*.* | |
linux-unit-test: | |
name: Linux Unit Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: "" | |
submodules: true | |
- name: Setup nodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18.16.1" | |
- name: Install dependencies | |
run: npm i | |
- name: "Run unit tests" | |
run: | | |
npm test >> unit_test.txt | |
cat unit_test.txt | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-unit-test | |
path: unit_test.txt | |
- uses: tsickert/discord-webhook@v4.0.0 | |
with: | |
webhook-url: ${{ secrets.DISCORD_DEV_WEBHOOK }} | |
content: "Heyo, here are the editor unit test results!" | |
filename: "unit_test.txt" |