Increase app version #25
Workflow file for this run
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: 💀 Alpha build | |
on: | |
push: | |
tags: | |
- "v[12].[0-9]+.[0-9]+-alpha*" | |
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 "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
echo "WORKFLOW_NAME=alpha" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: npm i | |
- name: Update package.json | |
run: node ./build-scripts/alpha-packageModifier.js | |
- name: Build | |
run: npm run export:alpha | |
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: 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: "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/[email protected] | |
with: | |
webhook-url: ${{ secrets.DISCORD_DEV_WEBHOOK }} | |
content: "Heyo, here are the editor unit test results!" | |
filename: "unit_test.txt" |