Skip to content

Publish Nightly

Publish Nightly #207

Workflow file for this run

name: Publish Nightly
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
check_date:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v4
- name: print latest_commit
run: echo ${{ github.sha }}
- id: should_run
continue-on-error: true
name: check latest commit is less than a day
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
build-distro:
strategy:
matrix:
distro: [alpine-3.18, arch, debian-bookworm, fedora-39, ubuntu-jammy]
needs: check_date
if: ${{ needs.check_date.outputs.should_run != 'false' }}
name: Build for ${{ matrix.distro }}
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Configure docker
run: |
echo '{ "experimental": true }' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
- name: Set up the build environment
run: ./bootstrap.sh tools setup
- name: Build & package for ${{ matrix.distro }}
run: |
meta/scripts/build-distro.sh ${{ matrix.distro }} --flavor=nightly
- name: Upload Packages to GitHub
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: .cutekit/dist/*
tag: "nightly"
file_glob: true
overwrite: true
prerelease: true