Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH workflow to create draft release with built static files #3489

Merged
merged 7 commits into from
Mar 18, 2024
Merged
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
42 changes: 42 additions & 0 deletions .github/workflows/create-draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build static files and create draft release

on:
push:
tags:
- "*"
workflow_dispatch:


jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 18

- name: Build frontend static files
working-directory: ./mathesar_ui
run: npm ci && npm run build

- name: Move static files
run: mv ./mathesar/static/mathesar ./static_files

- name: Zip static files
uses: montudor/action-zip@v1
with:
args: zip -qq -r static_files.zip static_files

- name: Create a draft release
id: create_release
uses: shogo82148/actions-create-release@v1
with:
draft: true

- name: Upload assets
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: static_files.zip
26 changes: 11 additions & 15 deletions docs/docs/installation/build-from-source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ You'll need to install the following system packages before you install Mathesar

- [PostgreSQL](https://www.postgresql.org/download/linux/) 13 or newer (Verify by logging in, and running the query: `SELECT version();`)

- [NodeJS](https://nodejs.org/en/download) 18 or newer (Verify with `node --version`)

_(This is required for installation only and will eventually be [relaxed](https://github.com/centerofci/mathesar/issues/2871))_

- [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) 9 or newer (Verify with `npm --version`)

_(This is required for installation only and will eventually be [relaxed](https://github.com/centerofci/mathesar/issues/2871))_

- [Caddy](https://caddyserver.com/docs/install) (Verify with `caddy version`)

- [git](https://git-scm.com/downloads) (Verify with `git --version`)
Expand Down Expand Up @@ -220,16 +212,20 @@ Then press <kbd>Enter</kbd> to customize this guide with your domain name.
You need to export the environment variables each time you restart the shell as they don't persist across sessions.


1. Install the frontend dependencies
1. Download release static files and extract into the correct directory

```
wget https://github.com/mathesar-foundation/mathesar/releases/download/{{mathesar_version}}/static_files.zip
unzip static_files.zip && mv static_files /mathesar/static/mathesar
```


1. Compile Mathesar translation files

```
npm ci --prefix mathesar_ui
python manage.py compilemessages
```

1. Compile the Mathesar Frontend App
```
npm run --prefix mathesar_ui build --max_old_space_size=4096
```


1. Install Mathesar functions on the database:

Expand Down
Loading