Skip to content

Commit

Permalink
KKERTI update builds
Browse files Browse the repository at this point in the history
  • Loading branch information
kkerti committed Aug 3, 2023
1 parent 996406f commit fda3bce
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 21 deletions.
110 changes: 110 additions & 0 deletions .github/workflows/alpha-matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Matrix build Grid Editor (ALPHA)

on:
push:
tags:
- "v[12].[0-9]+.[0-9]+-alpha*"

jobs:
matrix-build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
ref: ""
submodules: true

- name: Setup NodeJs
uses: actions/setup-node@v3
with:
node-version: "16.13.2"

- name: Set Env
shell: bash
run: |
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "${{ env.BRANCH_NAME }}"
echo "RELEASE_CHANNEL=alpha" >> $GITHUB_ENV
- name: Update package.json
run: node ./build-scripts/nightly-packageModifier.js

- name: Install dependencies
run: npm i

- 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_ID_PASSWORD: ${{secrets.APPLE_ID_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@v3
with:
name: ${{ matrix.os }}-nightly
path: build/*.*

- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.RELEASE_VERSION }}
name: Release ${{ env.RELEASE_VERSION }}
files: build/*.*
draft: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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: "16.13.2"

- 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@v3
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"
16 changes: 4 additions & 12 deletions .github/workflows/nightly-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Matrix build Grid Editor (Nightly)

on: push
on:
push:
tags-ignore:
- "*"

jobs:
matrix-build:
Expand Down Expand Up @@ -59,17 +62,6 @@ jobs:
with:
name: ${{ matrix.os }}-nightly
path: build/*.*

- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.RELEASE_VERSION }}
name: Release ${{ env.RELEASE_VERSION }}
files: build/*.*
draft: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

linux-unit-test:
name: Linux Unit Test
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/stable-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
tags:
- 'v[12].[0-9]+.[0-9]+'
- "v[12].[0-9]+.[0-9]+"

jobs:
matrix-build:
Expand Down Expand Up @@ -34,13 +34,6 @@ jobs:
- name: Install dependencies
run: npm i

- name: Create buildVariables.json
id: create-json-1
uses: jsdaniell/create-json@v1.2.2
with:
name: "buildVariables.json"
json: '{"BUILD_ENV":"production", "PROFILE_CLOUD_URL":"https://profiles.intech.studio"}'

- name: Build
run: npm run export
env:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@
"electron:dev": "cross-env NODE_OPTIONS=--max_old_space_size=8198 electron-vite dev --watch",
"electron-dev": "run-s gen:buildVars:dev electron:dev"
}
}
}

0 comments on commit fda3bce

Please sign in to comment.