diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0614d5..20edf6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,6 +29,11 @@ jobs: with: submodules: recursive + - uses: nowsprinting/check-version-format-action@98485692a883d962227b09f40f29a63de0771299 # v4.0.2 + id: version + with: + prefix: "v" + - name: Set up QEMU uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 @@ -52,21 +57,8 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - - name: Detect pre-release - id: check_tag - run: | - if [[ ! ${{ github.ref_name }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "This is a pre-release tag" - echo "pre_release=true" >> $GITHUB_ENV - exit 0 - else - echo "This is a not pre-release tag" - echo "pre_release=false" >> $GITHUB_ENV - exit 0 - fi - - name: Add latest tag - if: steps.check_tag.outputs.pre_release != 'true' + if: steps.version.outputs.is_stable == 'true' uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 with: platforms: linux/amd64,linux/arm64