From 42223b75217d6050309d81f8d89f4c2edd29aa78 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Fri, 21 Feb 2025 11:05:46 +0800 Subject: [PATCH] build: use .svu.yml configuration file --- .github/workflows/release.yml | 8 ++++---- .svu.yml | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .svu.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e82c53c0..965659943 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,14 +53,14 @@ jobs: run: brew install caarlos0/tap/svu - name: Compute next version for release run: | - echo "VERSION_NEXT=`svu --tag.pattern="[0-9]*" --tag.prefix '' ${{ inputs.bump }}`" | tee -a $GITHUB_ENV - echo "VERSION_NEXT_SUFFIX=`svu --tag.pattern="[0-9]*" --tag.prefix '' ${{ inputs.bump }}`" | tee -a $GITHUB_ENV + echo "VERSION_NEXT=`svu ${{ inputs.bump }}`" | tee -a $GITHUB_ENV + echo "VERSION_NEXT_SUFFIX=`svu ${{ inputs.bump }}`" | tee -a $GITHUB_ENV - name: Set Versions id: versions run: | - echo "version_current=`svu --tag.pattern="[0-9]*" --tag.prefix '' current`" >> $GITHUB_OUTPUT + echo "version_current=`svu current`" >> $GITHUB_OUTPUT echo "version_next=${{ env.VERSION_NEXT_SUFFIX }}" >> $GITHUB_OUTPUT - [[ `svu --tag.pattern="[0-9]*" --tag.prefix '' current` != ${{ env.VERSION_NEXT }} ]] && echo "should_release=true" >> $GITHUB_OUTPUT || echo + [[ `svu current` != ${{ env.VERSION_NEXT }} ]] && echo "should_release=true" >> $GITHUB_OUTPUT || echo release: name: Release diff --git a/.svu.yml b/.svu.yml new file mode 100644 index 000000000..785d247bd --- /dev/null +++ b/.svu.yml @@ -0,0 +1,3 @@ +tag: + prefix: '' + pattern: '[0-9]*' \ No newline at end of file