diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d4e87f2..23c8256 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,13 @@ jobs: steps: - id: calver if: ${{ !github.event.client_payload.version }} - run: echo "::set-output name=version::$(date +'%y.%-m.0')" + run: | + DATE_PART=$(date +'%y.%-m') + PATCH_VERSION=0 + while curl -sf -o /dev/null "https://api.github.com/repos/$GITHUB_REPOSITORY/git/ref/tags/$DATE_PART.$PATCH_VERSION"; do + (( PATCH_VERSION++ )) + done + echo "::set-output name=version::"$DATE_PART.$PATCH_VERSION"" - uses: actions/checkout@v2 - uses: getsentry/craft@master if: ${{ !github.event.client_payload.skip_prepare }}