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