Skip to content

Merge pull request #62 from New-Club-Penguin/development #120

Merge pull request #62 from New-Club-Penguin/development

Merge pull request #62 from New-Club-Penguin/development #120

Workflow file for this run

name: Build NewCP-App
# Controls when the action will run.
on:
# Triggers the workflow on push for production branch
push:
branches:
- production
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
name: Build NewCP-App
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-2022]
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24.x'
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Setup MSBuild
if: startsWith(matrix.os, 'windows')
uses: microsoft/setup-msbuild@v2
- name: Install dependencies
run: yarn
- name: Install flatpak
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install flatpak -y
sudo apt-get install flatpak-builder -y
sudo apt-get install elfutils -y
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo flatpak install flathub org.freedesktop.Platform/x86_64/24.08 org.freedesktop.Sdk/x86_64/24.08 org.electronjs.Electron2.BaseApp/x86_64/24.08 -y
git config --global --add protocol.file.allow always
- name: Make and Publish (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: yarn run publish
env:
GITHUB_TOKEN: ${{ secrets.BUILD_TOKEN }}
- name: Make and Publish (WINDOWS)
if: startsWith(matrix.os, 'windows')
run: yarn run publish-windows
env:
GITHUB_TOKEN: ${{ secrets.BUILD_TOKEN }}
- name: Make and Publish (MAC)
if: startsWith(matrix.os, 'macos')
run: yarn run publish-mac
env:
GITHUB_TOKEN: ${{ secrets.BUILD_TOKEN }}