Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
82d0882
Update ThemeValues.ts
Jan 5, 2025
331d6eb
fix gruvbox
Jan 5, 2025
d91313a
Tweak drawing background
Jan 5, 2025
d6eb620
Merge pull request #463 from worthalex/next-dev
NickGeek Jan 5, 2025
f7cfdea
made gruvbox drawing backgrounds actually transparent
Jan 5, 2025
68de784
Merge pull request #464 from worthalex/next-dev
NickGeek Jan 5, 2025
d1819d0
Updating to v4 artifact actions due to v3 being deprecated
NickGeek Feb 2, 2025
223bf91
Migrating to yarn and fixing build
NickGeek Apr 30, 2025
c7e527a
De-bunning the project
NickGeek Apr 30, 2025
c389fd4
Updating dependencies
NickGeek Aug 9, 2025
ac36f77
Trying out tsgo
NickGeek Aug 9, 2025
7d665c5
Bumping version number
NickGeek Aug 9, 2025
597d85b
Merge branch 'master' into next-dev
NickGeek Aug 9, 2025
9946ffe
Fixing Gruvbox styling
NickGeek Aug 9, 2025
15ddf54
Bumping version further because new theme
NickGeek Aug 9, 2025
652cdb0
Making drawings more visible with Gruvbox
NickGeek Aug 9, 2025
a1642e4
Making Pastel the default theme
NickGeek Aug 9, 2025
aa55bf9
Waiting one frame before watching for pointer moves
NickGeek Aug 9, 2025
a02ecbe
Updated What's New
NickGeek Aug 9, 2025
df7fb6a
Updating to actions/upload-artifact@v4
NickGeek Aug 9, 2025
b80a174
Adding in a playwright install step to get browsers
NickGeek Aug 9, 2025
477cbce
Updating playwright snapshot because the theme it's using is now Pastel
NickGeek Aug 9, 2025
fb6b06b
Updating actions
NickGeek Aug 9, 2025
e7f3813
Updating actions (again lol)
NickGeek Aug 9, 2025
d1dceae
Updating actions (again lol)
NickGeek Aug 9, 2025
d77e377
Updating actions (again lol)
NickGeek Aug 9, 2025
385a422
Dropping dev server logspam
NickGeek Aug 9, 2025
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
235 changes: 121 additions & 114 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,144 +1,151 @@
name: "Build & Test"
name: "CI & Deploy"

on:
push:
pull_request:
schedule:
- cron: 0 0 * * 0
- cron: '0 0 * * 0'

jobs:
build:
name: Build
ci:
name: Build, Lint & Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- uses: oven-sh/setup-bun@v1
- name: Install node dependencies
working-directory: app
run: bun install
- name: Lint
working-directory: app
run: |
bun run typecheck
bun run lint
- name: Build
working-directory: app
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
bun run build
tar cfJ micropad.tar.xz build/*
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: micropad
path: 'app/micropad.tar.xz'
test:
name: Test
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- uses: oven-sh/setup-bun@v1
- uses: actions/download-artifact@v3
with:
name: micropad
- name: Install node dependencies
working-directory: app
run: |
bun install
bun run playwright install
- name: Run Micropad in background for testing
run: |
mkdir micropad
tar xf micropad.tar.xz -C micropad
cd micropad/build
python3 -m http.server 3000 &
- name: Test
working-directory: app
run: bun run test
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js and Yarn Cache
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'
cache-dependency-path: app/yarn.lock

- name: Install node dependencies
working-directory: ./app
run: yarn install --frozen-lockfile

- name: Install Playwright Browsers & Dependencies
working-directory: ./app
run: npx playwright install --with-deps

- name: Lint
working-directory: ./app
run: |
yarn typecheck
yarn lint

- name: Build
working-directory: ./app
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: yarn build

- name: Run Tests
working-directory: ./app
# Start the server in the background and then run tests
run: |
cd build
python3 -m http.server 3000 > /dev/null &
cd ..
yarn test

- name: Package build artifact
working-directory: ./app
run: tar cfJ micropad.tar.xz build/

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: micropad
path: app/micropad.tar.xz
overwrite: true

deploy:
name: Deploy
runs-on: ubuntu-latest
environment:
name: production
url: "https://web.getmicropad.com"
needs: [build, test]
needs: [ci]
if: github.ref == 'refs/heads/master' && github.repository == 'micropad/Micropad-Core'
steps:
- uses: actions/download-artifact@v3
with:
name: micropad
- run: |
mkdir app
tar xf micropad.tar.xz -C app
- name: Upload files
uses: oracle-actions/run-oci-cli-command@v1.1
env:
OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}
with:
command: os object sync -bn micropad-js --content-type auto --src-dir app/build
- uses: actions/download-artifact@v4
with:
name: micropad

- run: |
mkdir -p app/build
tar xf micropad.tar.xz -C app/build

- name: Upload files
uses: oracle-actions/run-oci-cli-command@v1.1
env:
OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}
with:
command: os object sync -bn micropad-js --content-type auto --src-dir app/build

canary-deploy:
name: Canary Deploy
runs-on: ubuntu-latest
environment:
name: next
url: "https://next.getmicropad.com"
needs: [build, test]
needs: [ci]
if: github.ref == 'refs/heads/next-dev' && github.repository == 'micropad/Micropad-Core'
steps:
- uses: actions/download-artifact@v3
with:
name: micropad
- run: |
mkdir app
tar xf micropad.tar.xz -C app
- name: Upload files
uses: oracle-actions/run-oci-cli-command@v1.1
env:
OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}
with:
command: os object sync -bn micropad-js-next --content-type auto --src-dir app/build
- uses: actions/download-artifact@v4
with:
name: micropad

- run: |
mkdir -p app/build
tar xf micropad.tar.xz -C app/build

- name: Upload files
uses: oracle-actions/run-oci-cli-command@v1.1
env:
OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}
with:
command: os object sync -bn micropad-js-next --content-type auto --src-dir app/build

release:
name: Publish Release on GitHub
runs-on: ubuntu-latest
needs: [build, test]
needs: [ci]
if: github.ref == 'refs/heads/master' && github.event_name != 'schedule'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get micropad version
id: micropad-version
working-directory: app
run: echo "version=v$(npm pkg get version | sed 's/"//g')" >> $GITHUB_OUTPUT
- uses: actions/download-artifact@v3
with:
name: micropad
- uses: dev-drprasad/delete-tag-and-release@v0.2.1
with:
delete_release: true
tag_name: ${{ steps.micropad-version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: micropad.tar.xz
tag_name: ${{ steps.micropad-version.outputs.version }}
target_commitish: master
- name: Checkout repository
uses: actions/checkout@v4

- name: Get micropad version
id: micropad-version
working-directory: ./app
run: echo "version=v$(npm pkg get version | sed 's/\"//g')" >> $GITHUB_OUTPUT

- uses: actions/download-artifact@v4
with:
name: micropad

- name: Delete existing tag and release
uses: dev-drprasad/delete-tag-and-release@v0.2.1
with:
delete_release: true
tag_name: ${{ steps.micropad-version.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: micropad.tar.xz
tag_name: ${{ steps.micropad-version.outputs.version }}
target_commitish: master
2 changes: 1 addition & 1 deletion app/.run/build.run.xml → .run/build.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="build" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<package-json value="$PROJECT_DIR$/app/package.json" />
<command value="run" />
<scripts>
<script value="build" />
Expand Down
2 changes: 1 addition & 1 deletion app/.run/lint.run.xml → .run/lint.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="lint" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<package-json value="$PROJECT_DIR$/app/package.json" />
<command value="run" />
<scripts>
<script value="lint" />
Expand Down
2 changes: 1 addition & 1 deletion app/.run/start.run.xml → .run/start.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="start" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<package-json value="$PROJECT_DIR$/app/package.json" />
<command value="run" />
<scripts>
<script value="start" />
Expand Down
2 changes: 1 addition & 1 deletion app/.run/typecheck.run.xml → .run/typecheck.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="typecheck" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<package-json value="$PROJECT_DIR$/app/package.json" />
<command value="run" />
<scripts>
<script value="typecheck" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="typecheck:watch" type="js.build_tools.npm" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" />
<package-json value="$PROJECT_DIR$/app/package.json" />
<command value="run" />
<scripts>
<script value="typecheck:watch" />
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ There are a couple [GitHub Project boards](https://github.com/orgs/MicroPad/proj

## Building MicroPad
You will need the following:
- [Bun](https://bun.sh/)
- [Yarn](https://classic.yarnpkg.com/lang/en/) classic
- [Node.js](https://nodejs.org/en/)
- [Python 3](https://www.python.org/)

### Installing dependencies
```bash
git clone https://github.com/MicroPad/MicroPad-Core.git micropad-core
cd micropad-core/app
bun install
yarn install
```

### Running a dev server
```bash
bun run start
yarn typecheck:watch & yarn start
```
### Building for production
```bash
bun run build
yarn build
```
2 changes: 1 addition & 1 deletion app/_build/build.mts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import servor from 'servor';
import { getUserAgentRegex } from 'browserslist-useragent-regexp';
import { createHash } from 'crypto';
import { sentryEsbuildPlugin } from '@sentry/esbuild-plugin';
import packageJson from '../package.json' assert { type: 'json' };
import packageJson from '../package.json' with { type: 'json' };
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);

Expand Down
Binary file removed app/bun.lockb
Binary file not shown.
1 change: 0 additions & 1 deletion app/eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const config: Linter.Config[] = [
},
settings: {
react: {
...react.configs.recommended.settings,
version: 'detect'
}
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading