Skip to content

Commit

Permalink
CI: daily build
Browse files Browse the repository at this point in the history
  • Loading branch information
sqzw-x committed Mar 11, 2024
1 parent 5b60511 commit 60122f1
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
push:
tags:
- 120*
- pre-20*
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
tag:
Expand All @@ -21,7 +22,15 @@ jobs:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
count: ${{ steps.get-new-commits.outputs.count }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get new commits
id: get-new-commits
run: echo "count=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_OUTPUT

# https://github.com/actions/runner/issues/1985#issuecomment-1573518052
- name: Set matrix
id: set-matrix
Expand Down Expand Up @@ -64,6 +73,7 @@ jobs:
build-app:
needs: init-matrix
runs-on: ${{ matrix.os }}
if: ${{ needs.init-matrix.outputs.count > 0 }}
strategy:
fail-fast: false
matrix:
Expand All @@ -89,7 +99,7 @@ jobs:
cache: ${{ matrix.cache || 'pip' }}

- name: Set up Python - no cache
if : ${{ matrix.cache == 'none' }}
if: ${{ matrix.cache == 'none' }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python || env.PYTHON_VERSION }}
Expand Down Expand Up @@ -146,7 +156,7 @@ jobs:
file: dist/MDCx.dmg
prerelease: ${{ !startsWith(github.ref, 'refs/tags/120') }}
body: |
${{ steps.get-changelog.outputs.CHANGELOG }}
${{ !startsWith(github.ref, 'refs/tags/120') && steps.get-changelog.outputs.CHANGELOG }}
- name: Create Release - Windows
uses: svenstaro/upload-release-action@2.7.0
Expand Down

0 comments on commit 60122f1

Please sign in to comment.