Skip to content
Merged

CD #430

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 95 additions & 95 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ jobs:
fail-fast: false
matrix:
include:
# - name: Windows (Intel)
# os: windows-2022
- name: Windows (Intel)
os: windows-2022
- name: Windows (ARM)
os: windows-11-arm
# - name: Linux (Intel)
# os: ubuntu-22.04
# - name: Linux (ARM)
# os: ubuntu-22.04-arm
# - name: macOS (Intel)
# os: macos-15-intel
# - name: macOS (ARM)
# os: macos-15
- name: Linux (Intel)
os: ubuntu-22.04
- name: Linux (ARM)
os: ubuntu-22.04-arm
- name: macOS (Intel)
os: macos-15-intel
- name: macOS (ARM)
os: macos-15
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_ID: ${{ secrets.APPLE_ID }}
Expand Down Expand Up @@ -92,88 +92,88 @@ jobs:
run: bun run build
- name: Release OpenCOR
run: bun release
# web_app:
# if: ${{ github.repository == 'opencor/webapp' }}
# name: Web app
# runs-on: ubuntu-22.04
# steps:
# - name: Set the timezone to New Zealand
# uses: szenius/set-timezone@v2.0
# with:
# timezoneLinux: 'Pacific/Auckland'
# - name: Check out OpenCOR
# uses: actions/checkout@v4
# - name: Install Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 'lts/*'
# - name: Install bun
# run: npm install -g bun
# - name: OpenCOR dependencies
# run: bun install
# - name: Build OpenCOR's Web app
# env:
# VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
# VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
# VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
# VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
# run: bun build:web
# - name: Deploy to https://opencor.ws/app/
# uses: milanmk/actions-file-deployer@master
# with:
# remote-protocol: sftp
# remote-host: ${{ secrets.REMOTE_HOST }}
# remote-user: ${{ secrets.REMOTE_USER }}
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
# local-path: ./src/renderer/dist
# remote-path: /home/www/opencor.ws/app
# sync: full
# - name: Archive OpenCOR's Web app
# run: bun archive:web
# - name: Release OpenCOR's Web app
# uses: softprops/action-gh-release@v2
# with:
# files: dist/OpenCOR-*-WebApp.tar.gz
# npm:
# runs-on: ubuntu-22.04
# steps:
# - name: Set the timezone to New Zealand
# uses: szenius/set-timezone@v2.0
# with:
# timezoneLinux: 'Pacific/Auckland'
# - name: Check out OpenCOR
# uses: actions/checkout@v4
# - name: Install Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 'lts/*'
# registry-url: 'https://registry.npmjs.org'
# - name: Update npm
# # Install the latest version of npm since we need npm 11.5.1 or later to publish to npm using OIDC (see
# # https://docs.npmjs.com/trusted-publishers).
# run: npm install -g npm@latest
# - name: Install bun
# run: npm install -g bun
# - name: OpenCOR dependencies
# run: |
# cd src/renderer
# bun install
# - name: Build OpenCOR as a component
# env:
# VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
# VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
# VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
# VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
# run: |
# cd src/renderer
# bun build:lib
# - name: Publish OpenCOR
# # bun cannot currently be used to publish to npm using OIDC (see https://github.com/oven-sh/bun/issues/22423 and
# # https://github.com/oven-sh/bun/issues/15601), so we use npm instead. To publish using OIDC implies automatic
# # provenance generation, so no need to specify --provenance (see https://docs.npmjs.com/trusted-publishers).
# # Provenance requires "repository.url" in package.json to match the repository from which we are publishing. In
# # our case, it means that we can only publish to npm from the "opencor/webapp" repository. (Provenance can be
# # disabled, but we prefer to be open.)
# run: |
# cd src/renderer
# npm publish --access public --no-git-checks
web_app:
if: ${{ github.repository == 'opencor/webapp' }}
name: Web app
runs-on: ubuntu-22.04
steps:
- name: Set the timezone to New Zealand
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: 'Pacific/Auckland'
- name: Check out OpenCOR
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install bun
run: npm install -g bun
- name: OpenCOR dependencies
run: bun install
- name: Build OpenCOR's Web app
env:
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
run: bun build:web
- name: Deploy to https://opencor.ws/app/
uses: milanmk/actions-file-deployer@master
with:
remote-protocol: sftp
remote-host: ${{ secrets.REMOTE_HOST }}
remote-user: ${{ secrets.REMOTE_USER }}
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
local-path: ./src/renderer/dist
remote-path: /home/www/opencor.ws/app
sync: full
- name: Archive OpenCOR's Web app
run: bun archive:web
- name: Release OpenCOR's Web app
uses: softprops/action-gh-release@v2
with:
files: dist/OpenCOR-*-WebApp.tar.gz
npm:
runs-on: ubuntu-22.04
steps:
- name: Set the timezone to New Zealand
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: 'Pacific/Auckland'
- name: Check out OpenCOR
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- name: Update npm
# Install the latest version of npm since we need npm 11.5.1 or later to publish to npm using OIDC (see
# https://docs.npmjs.com/trusted-publishers).
run: npm install -g npm@latest
- name: Install bun
run: npm install -g bun
- name: OpenCOR dependencies
run: |
cd src/renderer
bun install
- name: Build OpenCOR as a component
env:
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
run: |
cd src/renderer
bun build:lib
- name: Publish OpenCOR
# bun cannot currently be used to publish to npm using OIDC (see https://github.com/oven-sh/bun/issues/22423 and
# https://github.com/oven-sh/bun/issues/15601), so we use npm instead. To publish using OIDC implies automatic
# provenance generation, so no need to specify --provenance (see https://docs.npmjs.com/trusted-publishers).
# Provenance requires "repository.url" in package.json to match the repository from which we are publishing. In
# our case, it means that we can only publish to npm from the "opencor/webapp" repository. (Provenance can be
# disabled, but we prefer to be open.)
run: |
cd src/renderer
npm publish --access public --no-git-checks
22 changes: 15 additions & 7 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"url": "git+https://github.com/opencor/webapp.git"
},
"type": "module",
"version": "0.20260227.0",
"version": "0.20260227.1",
"scripts": {
"archive:web": "bun src/renderer/scripts/archive.web.js",
"build": "bun src/renderer/scripts/libopencor.js && electron-vite build",
Expand Down Expand Up @@ -66,7 +66,7 @@
"@electron-toolkit/utils": "^4.0.0",
"@tailwindcss/postcss": "^4.2.1",
"@tailwindcss/vite": "^4.2.1",
"@types/node": "^25.3.1",
"@types/node": "^25.3.2",
"@types/plotly.js": "^3.0.10",
"@vitejs/plugin-vue": "^6.0.4",
"@vue/tsconfig": "^0.8.1",
Expand Down
Loading