From 3ce2b30dc4ef8490e675c12e4bbdd624b923193a Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Wed, 30 Jul 2025 21:22:34 +0800 Subject: [PATCH] ci: do not use `battila7/get-version-action@v2` Deprecating set-output command. Signed-off-by: Jianhui Zhao --- .github/workflows/release.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f92e4d9..97ac16a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,9 @@ jobs: - uses: actions/checkout@v4 - id: get-version - uses: battila7/get-version-action@v2 + run: | + VERSION="${GITHUB_REF#refs/tags/v}" + echo "version=$VERSION" >> $GITHUB_OUTPUT - uses: docker/login-action@v3 with: @@ -27,7 +29,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: | - zhaojh329/rttys:${{ steps.get-version.outputs.version-without-v }} + zhaojh329/rttys:${{ steps.get-version.outputs.version }} zhaojh329/rttys:latest ghcr: @@ -36,7 +38,9 @@ jobs: - uses: actions/checkout@v4 - id: get-version - uses: battila7/get-version-action@v2 + run: | + VERSION="${GITHUB_REF#refs/tags/v}" + echo "version=$VERSION" >> $GITHUB_OUTPUT - uses: docker/login-action@v3 with: @@ -52,7 +56,7 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: | - ghcr.io/${{ github.repository_owner }}/rttys:${{ steps.get-version.outputs.version-without-v }} + ghcr.io/${{ github.repository_owner }}/rttys:${{ steps.get-version.outputs.version }} ghcr.io/${{ github.repository_owner }}/rttys:latest build: @@ -61,7 +65,9 @@ jobs: - uses: actions/checkout@v4 - id: get-version - uses: battila7/get-version-action@v2 + run: | + VERSION="${GITHUB_REF#refs/tags/v}" + echo "version=$VERSION" >> $GITHUB_OUTPUT - uses: actions/setup-go@v5 with: @@ -92,9 +98,9 @@ jobs: uses: softprops/action-gh-release@v1 with: files: | - rttys_${{ steps.get-version.outputs.version-without-v }}_amd64.deb - rttys_${{ steps.get-version.outputs.version-without-v }}_arm64.deb - rttys-${{ steps.get-version.outputs.version-without-v }}-linux-amd64.tar.bz2 - rttys-${{ steps.get-version.outputs.version-without-v }}-linux-arm64.tar.bz2 - rttys-${{ steps.get-version.outputs.version-without-v }}-windows-amd64.tar.bz2 + rttys_${{ steps.get-version.outputs.version }}_amd64.deb + rttys_${{ steps.get-version.outputs.version }}_arm64.deb + rttys-${{ steps.get-version.outputs.version }}-linux-amd64.tar.bz2 + rttys-${{ steps.get-version.outputs.version }}-linux-arm64.tar.bz2 + rttys-${{ steps.get-version.outputs.version }}-windows-amd64.tar.bz2 draft: true