From dbb91a7b5e87a12a26a5ee12d110bffe32279c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Ho=C3=9F?= Date: Sat, 4 Nov 2023 10:59:54 +0100 Subject: [PATCH] count commits since last release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sebastian Hoß --- .github/workflows/release.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d05cbd083..12e5c12d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,10 +10,17 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - id: checkout + name: Checkout + uses: actions/checkout@v4 + - id: last_release + name: Fetch last release info + run: echo "tag=$(gh release view --json tagName --jq '.tagName')" >> $GITHUB_OUTPUT + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - id: commits name: Count Commits - run: echo "count=$(git rev-list --count HEAD --since='last week')" >> $GITHUB_OUTPUT + run: echo "count=$(git rev-list --count ${{ steps.last_release.outputs.tag }}..HEAD)" >> $GITHUB_OUTPUT - id: release name: Create Release Version if: steps.commits.outputs.count > 0