mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-30 08:00:20 +00:00
51498e1238
This automatically triggers and grabs the build artifacts for systems that are only supported on Cirrus CI (as of now, FreeBSD and M1 macOS). * ci: add cirrus build trigger script * ci: modify build scripts to include cirrus build * fix some stuff * update docs * more fixes
82 lines
2.3 KiB
YAML
82 lines
2.3 KiB
YAML
# Creates nightly deployment builds for main targets. Note this does not cover package distribution channels,
|
|
# such as choco.
|
|
|
|
name: nightly
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
workflow_dispatch:
|
|
inputs:
|
|
isMock:
|
|
description: "Replace to trigger a non-mock run."
|
|
default: "mock"
|
|
required: false
|
|
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
CARGO_PROFILE_DEV_DEBUG: 0
|
|
|
|
jobs:
|
|
initialize-job:
|
|
name: initialize-job
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check if mock
|
|
run: |
|
|
echo "${{ github.event.inputs.isMock }}";
|
|
if [[ -z "${{ github.event.inputs.isMock }}" ]]; then
|
|
echo "This is a scheduled nightly run."
|
|
elif [[ "${{ github.event.inputs.isMock }}" == "mock" ]]; then
|
|
echo "This is a mock run."
|
|
else
|
|
echo "This is NOT a mock run. Watch for the generated files!"
|
|
fi
|
|
|
|
build-release:
|
|
needs: [initialize-job]
|
|
uses: ./.github/workflows/build_releases.yml
|
|
with:
|
|
caller: "nightly"
|
|
secrets: inherit
|
|
|
|
upload-release:
|
|
name: upload-release
|
|
runs-on: ubuntu-latest
|
|
needs: [build-release]
|
|
steps:
|
|
- name: Get release artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: release
|
|
path: release
|
|
|
|
- name: Print out all release files
|
|
run: |
|
|
echo "Generated $(ls ./release | wc -l) files:"
|
|
du -h -d 0 ./release/*
|
|
|
|
- name: Delete tag and release
|
|
uses: dev-drprasad/delete-tag-and-release@085c6969f18bad0de1b9f3fe6692a3cd01f64fe5 # 0.2.0
|
|
if: github.event.inputs.isMock != 'mock'
|
|
with:
|
|
delete_release: true
|
|
tag_name: nightly
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Sleep for a few seconds to prevent timing issues between the deletion and creation of the release
|
|
run: sleep 10
|
|
if: github.event.inputs.isMock != 'mock'
|
|
|
|
- name: Upload all saved release files if not mock
|
|
uses: softprops/action-gh-release@17cd0d34deddf848fc0e7d9be5202c148c270a0a # 0.1.14
|
|
if: github.event.inputs.isMock != 'mock'
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
prerelease: true
|
|
tag_name: "nightly"
|
|
draft: false
|
|
fail_on_unmatched_files: true
|
|
files: |
|
|
./release/*
|