Skip to content

Commit

Permalink
Enable GitHub Actions
Browse files Browse the repository at this point in the history
Run umbreld cI on push and build OS images on tag
  • Loading branch information
lukechilds committed Apr 5, 2024
1 parent 096171d commit 5b1fa4a
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 94 deletions.
70 changes: 24 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,26 @@
# name: Node.js CI
name: Node.js CI

# on: push
on: push

# # defaults:
# # run:
# # working-directory: packages/umbreld

# # jobs:
# # build:
# # runs-on: ubuntu-latest
# # strategy:
# # fail-fast: false
# # matrix:
# # task:
# # - format:check
# # - lint
# # - typecheck
# # - test:unit -- --coverage
# # - test:integration -- --coverage
# # steps:
# # - uses: actions/checkout@v3
# # - uses: actions/setup-node@v3
# # with:
# # node-version: 18
# # - run: npm clean-install
# # - run: npm run ${{ matrix.task }}

# defaults:
# run:
# working-directory: packages/os

# jobs:
# build-os:
# runs-on: release-runner-64
# strategy:
# fail-fast: false
# matrix:
# task:
# - build:amd64
# - build:arm64
# steps:
# - uses: actions/checkout@v3
# - uses: docker/setup-buildx-action@v2
# - uses: actions/setup-node@v3
# with:
# node-version: 18
# - run: npm run ${{ matrix.task }}
jobs:
ci:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/umbreld
strategy:
fail-fast: false
matrix:
task:
- format:check
# - lint
- typecheck
# - test:unit -- --coverage
# - test:integration -- --coverage
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm clean-install
- run: npm run ${{ matrix.task }}
91 changes: 43 additions & 48 deletions .github/workflows/create-release-on-tag.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,43 @@
# name: Create release on tag

# on:
# push:
# tags:
# - '*'

# jobs:
# build:
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./packages/umbreld
# steps:
# - name: Checkout codebase
# uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
# with:
# # We need this to get all commit history and tags to generate release notes
# fetch-depth: 0

# - name: Setup Docker buildx
# run: docker buildx create --use

# - name: Install dependencies
# run: npm ci

# - name: Build release
# run: npm run build

# - name: Prepare release assets
# run: npm run prepare-release -- ${{ github.ref_name }}

# - name: Timestamp release
# continue-on-error: true
# run: npm run timestamp-release

# - name: Generate release notes
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: npm run generate-release-notes

# - name: Create GitHub Release
# uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
# with:
# draft: true
# name: umbrelOS ${{ github.ref_name }}
# files: server/release/*
# body_path: server/release-notes.md
name: Create release on tag

on:
push:
tags:
- "*"

defaults:
run:
working-directory: packages/os

jobs:
build-os:
runs-on: release-runner-64
defaults:
run:
working-directory: packages/os
strategy:
fail-fast: false
matrix:
task:
- build:amd64
- build:arm64
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm run ${{ matrix.task }}

- name: Prepare release assets
if: matrix.task == 'build:arm64'
run: cd build && (zip umbrelos-pi4.img.zip umbrelos-pi4.img & zip umbrelos-pi5.img.zip umbrelos-pi5.img & wait)

- name: Create GitHub Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
draft: true
name: umbrelOS ${{ github.ref_name }}
files: |
packages/os/build/*.update
packages/os/build/*.img.zip

0 comments on commit 5b1fa4a

Please sign in to comment.