Skip to content

UI 1.1 (#75)

UI 1.1 (#75) #145

---
name: "Build and deploy bundle"
on: # yamllint disable-line rule:truthy
push:
branches:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
substituters = https://cache.nixos.org/
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
keep-env-derivations = true
keep-derivations = true
keep-outputs = true
- name: Restore and save Nix store and npm cache
uses: nix-community/cache-nix-action@v6
with:
primary-key: build-${{ runner.os }}-${{ hashFiles('yarn.lock', '.npmrc', 'package.json', 'flake.nix', 'flake.lock') }}
# do purge caches
purge: true
# purge all versions of the cache
purge-prefixes: build-${{ runner.os }}-
# created more than 0 seconds ago relative to the start of the `Post Restore` phase
purge-created: 0
# except the version with the `primary-key`, if it exists
purge-primary-key: never
# and collect garbage in the Nix store until it reaches this size in bytes
gc-max-store-size: 0
- run: |
set -eu
BUNDLE_DIR=$(nix build --no-link --print-out-paths .#)
mkdir output/
cp -r $BUNDLE_DIR/* output/
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: coral-console_${{ github.ref_name }}-${{ github.sha }}
path: |
./output/*
- name: Prepare for Release
if: github.ref_type == 'tag'
run: |
set -eu
cd ./output
zip -r ../bundle.zip *
- name: Release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
files: ./bundle.zip