Skip to content

fixing visibility issue with current hour highlighting #71

fixing visibility issue with current hour highlighting

fixing visibility issue with current hour highlighting #71

Workflow file for this run

name: Build and Release Sky Pi
on:
push:
tags:
- "*"
env:
ZIP_NAME: sky-pi-zip
ZIP: sky-pi.zip
BUILDS_NAME: builds-dir
BUILDS_PATH: builds
SKY_PI_DIR: sky-pi
# Project dirs
APP_DIR: ./sky-pi-app
DRAW_DIR: ./sky-pi-draw
# Versions
PYTHON_VER: 3.11
jobs:
build-app:
name: Build sky-pi app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v4.0.0
with:
package_json_file: 'sky-pi-app/package.json'
- name: Install dependencies
working-directory: ${{ env.APP_DIR }}
run: pnpm install
- name: Build sky-pi project
working-directory: ${{ env.APP_DIR }}
run: pnpm build
# FIXME: Remove this copy to artifacts dir when rasp pi emu is sorted out
- name: Copy draw project to temporary artifacts dir
working-directory: ${{ env.DRAW_DIR }}
run: |
mkdir ../${{ env.BUILDS_PATH }}/draw
cp -r * ../${{ env.BUILDS_PATH }}/draw
- name: Generate sky-pi.version file
run: |
touch ${{ env.BUILDS_PATH }}/sky-pi.version
echo "${GITHUB_REF##*/}" >> ${{ env.BUILDS_PATH }}/sky-pi.version
cat ${{ env.BUILDS_PATH }}/sky-pi.version
- name: Upload builds dir to artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILDS_NAME }}
path: ${{ env.BUILDS_PATH }}
include-hidden-files: true
# TODO: Figure out rasp pi emu, build with pyinstaller, and include dist in zip
# build-draw:
# name: Build sky-pi draw
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Setup Python ${{ env.PYTHON_VER }}
# uses: actions/setup-python@v5
# with:
# python-version: '${{ env.PYTHON_VER }}'
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# with:
# platforms: linux/arm/v7
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# - name: Install Dependencies
# working-directory: ${{ env.DRAW_DIR }}
# run: |
# sudo apt update
# sudo apt install -y qemu-user-static
# sudo apt install build-essential
# - name: Build Raspberry Pi Docker Image
# working-directory: ${{ env.DRAW_DIR }}
# run: |
# docker buildx create --use
# docker buildx build --platform linux/arm/v7 -t rpi-emulator --load .
# - name: Run Docker Container and Copy Executable
# working-directory: ${{ env.DRAW_DIR }}
# run: |
# docker run --rm -v $(pwd)/output:/host_output rpi-emulator \
# bash -c "cp /output/draw /host_output/"
# - name: Upload Executable
# uses: actions/upload-artifact@v4
# with:
# name: sky-pi-draw
# path: ${{ env.DRAW_DIR }}/output/draw
zip:
runs-on: ubuntu-latest
# TODO: Add build-draw to needs list when rasp pi emu is sorted out
needs: [build-app]
steps:
- name: Download app builds from artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.BUILDS_NAME }}
path: ${{ env.SKY_PI_DIR }}
# FIXME: Enable step when rasp pi emu is working
# - name: Download Draw dist from artifacts
# uses: actions/download-artifact@v4
# with:
# name: sky-pi-draw
# path: ${{ env.SKY_PI_DIR }}/actions/
- name: Zip build
run: |
zip -q -r ${{ env.ZIP }} ${{ env.SKY_PI_DIR }}
- name: Upload ${{ env.ZIP }} to artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.ZIP_NAME }}
path: ${{ env.ZIP }}
include-hidden-files: true
release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: zip
steps:
- name: Download ${{ env.ZIP }} from artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.ZIP_NAME }}
- name: Release sky-pi
uses: ncipollo/release-action@v1.14.0
with:
artifacts: ${{ env.ZIP }}
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
# If the tag associated with this workflow run doesn't denote this release as a
# release candidate, beta, or alpha, then tag the release as latest
makeLatest: ${{ !contains(fromJSON('["rc", "beta", "alpha"]'), github.ref) }}
commit: ${{ github.sha }}