screendump/.github/workflows/ci.yaml

61 lines
1.5 KiB
YAML

name: Theos CI
on:
push:
branches: ['*']
paths-ignore: ['.gitignore']
pull_request:
branches: ['*']
paths-ignore: ['.gitignore']
workflow_dispatch:
schedule:
- cron: '0 0 1 1 *'
- cron: '0 0 1 4 *'
- cron: '0 0 30 6 *'
- cron: '0 0 28 9 *'
- cron: '0 0 27 12 *'
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Theos Setup
uses: NyaMisty/theos-action@master
- name: Determine Tag or Default
id: determine_tag
run: |
# Check if the current ref is a tag
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
TAG_NAME="${GITHUB_REF#refs/tags/}"
else
TAG_NAME="0.0.5" # Fallback tag version
fi
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
- name: Build Release package - Rootful
run: |
cd screendumpLowFrame
make clean
make package FINALPACKAGE=1 PACKAGE_VERSION=${{ env.TAG_NAME }}-rootful
- name: Build Release package - Rootless
run: |
cd screendumpLowFrame
make clean
make package THEOS_PACKAGE_SCHEME=rootless FINALPACKAGE=1 PACKAGE_VERSION=${{ env.TAG_NAME }}-rootless
- name: Release
uses: softprops/action-gh-release@v1
with:
files: screendumpLowFrame/packages/*.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}