File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949 run : npm run fmt:check
5050 - name : Test
5151 run : npm test run -- --project unit
52- - name : Build
53- run : npm run build
52+ # Same packaging as upload-assets.yaml, minus the upload
53+ - name : Build and package
54+ run : SHA=${{ github.sha }} .github/workflows/package.sh
5455 playwright :
5556 name : Playwright (${{ matrix.playwright }})
5657 timeout-minutes : 20
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # This Source Code Form is subject to the terms of the Mozilla Public
3+ # License, v. 2.0. If a copy of the MPL was not distributed with this
4+ # file, you can obtain one at https://mozilla.org/MPL/2.0/.
5+ #
6+ # Copyright Oxide Computer Company
7+
8+ set -euxo pipefail
9+
10+ npm run build
11+ # Gzip individual files (keep originals)
12+ ls build/client/assets/* .{js,css,map} | xargs gzip --keep
13+ # add console_version file
14+ echo " ${SHA} " > build/client/VERSION
15+ # add API_VERSION file
16+ cp app/api/__generated__/API_VERSION build/client/API_VERSION
17+
18+ mkdir -p releases/console
19+ # Make <sha>.tar.gz
20+ tar czf releases/console/" ${SHA} " .tar.gz --directory=build/client .
21+ # Write sha256sum to file
22+ sha256sum releases/console/" ${SHA} " .tar.gz | awk ' {print $1}' > releases/console/" ${SHA} " .sha256.txt
Original file line number Diff line number Diff line change @@ -23,19 +23,12 @@ jobs:
2323 with :
2424 project_id : oxide-downloads
2525 - run : npm install
26+
27+ # Keep all packaging commands in .github/workflows/package.sh so that
28+ # source escrow tooling can re-use the same commands.
2629 - name : Build for Nexus
27- run : SHA=${{ github.sha }} npm run build
28- - name : Gzip individual files (keep originals)
29- run : ls build/client/assets/*.{js,css,map} | xargs gzip --keep
30- - name : add console_version file
31- run : echo ${{ github.sha }} > build/client/VERSION
32- - name : add API_VERSION file
33- run : cp app/api/__generated__/API_VERSION build/client/API_VERSION
34- - run : mkdir -p releases/console
35- - name : Make <sha>.tar.gz
36- run : tar czf releases/console/${{ github.sha }}.tar.gz --directory=build/client .
37- - name : Write sha256sum to file
38- run : sha256sum releases/console/${{ github.sha }}.tar.gz | awk '{print $1}' > releases/console/${{ github.sha }}.sha256.txt
30+ run : SHA=${{ github.sha }} .github/workflows/package.sh
31+
3932 - name : Upload files to GCP bucket
4033 id : upload-files
4134 uses : google-github-actions/upload-cloud-storage@v3
Original file line number Diff line number Diff line change @@ -40,3 +40,6 @@ test/visual/**/*.png
4040
4141# React Router build output. build/client is the deployable static site
4242/build /
43+
44+ # package.sh output (.github/workflows/package.sh)
45+ /releases /
You can’t perform that action at this time.
0 commit comments