CI #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: "tag name" | |
required: true | |
type: string | |
no_release: | |
description: "no_release" | |
required: true | |
type: boolean | |
push: | |
# Triggers on every tag starting with v | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install libfdt-dev and cmake | |
run: sudo apt install libfdt-dev cmake squashfs-tools | |
- name: Run builder script | |
run: | | |
mkdir -m 0700 $HOME/.gnupg | |
bash build_installer.sh | |
- name: upload-artifact - images | |
uses: actions/upload-artifact@v3 | |
with: | |
name: images | |
path: "*.itb" | |
release: | |
if: inputs.no_release == '0' | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
# https://cli.github.com/manual/gh_release_create | |
- name: Create Release | |
run: gh release create ${{ inputs.tag || github.ref_name }} | |
# https://cli.github.com/manual/gh_release_upload | |
- name: Upload assets | |
run: gh release upload ${{ inputs.tag || github.ref_name }} images/*.itb --clobber |