fix: use $GITHUB_REF_NAME env var instead of ${{ github.ref_name }} expression
Some checks failed
Release / build-windows-amd64 (push) Waiting to run
Release / build-linux-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
Test / frontend-typecheck (push) Failing after 14m53s
Test / frontend-tests (push) Has been cancelled
Test / rust-fmt-check (push) Has been cancelled
Test / rust-clippy (push) Has been cancelled
Test / rust-tests (push) Has been cancelled
Some checks failed
Release / build-windows-amd64 (push) Waiting to run
Release / build-linux-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
Test / frontend-typecheck (push) Failing after 14m53s
Test / frontend-tests (push) Has been cancelled
Test / rust-fmt-check (push) Has been cancelled
Test / rust-clippy (push) Has been cancelled
Test / rust-tests (push) Has been cancelled
Gitea 1.22 expression evaluator rewrites github.ref_name to
format('{0}', github.ref_name) which produces '%!t(string=v0.1.0)'
instead of 'v0.1.0'. Use the pre-set shell env var directly.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
661898ba91
commit
1271f51d1a
@ -8,8 +8,6 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-linux-amd64:
|
build-linux-amd64:
|
||||||
runs-on: linux-amd64
|
runs-on: linux-amd64
|
||||||
env:
|
|
||||||
RELEASE_TAG: ${{ github.ref_name }}
|
|
||||||
container:
|
container:
|
||||||
image: rust:1.88-slim
|
image: rust:1.88-slim
|
||||||
steps:
|
steps:
|
||||||
@ -39,7 +37,7 @@ jobs:
|
|||||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
API="http://172.0.0.29:3000/api/v1/repos/$GITHUB_REPOSITORY"
|
API="http://172.0.0.29:3000/api/v1/repos/$GITHUB_REPOSITORY"
|
||||||
TAG="$RELEASE_TAG"
|
TAG="$GITHUB_REF_NAME"
|
||||||
# Create release (idempotent)
|
# Create release (idempotent)
|
||||||
curl -sf -X POST "$API/releases" \
|
curl -sf -X POST "$API/releases" \
|
||||||
-H "Authorization: token $RELEASE_TOKEN" \
|
-H "Authorization: token $RELEASE_TOKEN" \
|
||||||
@ -57,8 +55,6 @@ jobs:
|
|||||||
|
|
||||||
build-windows-amd64:
|
build-windows-amd64:
|
||||||
runs-on: linux-amd64
|
runs-on: linux-amd64
|
||||||
env:
|
|
||||||
RELEASE_TAG: ${{ github.ref_name }}
|
|
||||||
container:
|
container:
|
||||||
image: rust:1.88-slim
|
image: rust:1.88-slim
|
||||||
steps:
|
steps:
|
||||||
@ -90,7 +86,7 @@ jobs:
|
|||||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
API="http://172.0.0.29:3000/api/v1/repos/$GITHUB_REPOSITORY"
|
API="http://172.0.0.29:3000/api/v1/repos/$GITHUB_REPOSITORY"
|
||||||
TAG="$RELEASE_TAG"
|
TAG="$GITHUB_REF_NAME"
|
||||||
curl -sf -X POST "$API/releases" \
|
curl -sf -X POST "$API/releases" \
|
||||||
-H "Authorization: token $RELEASE_TOKEN" \
|
-H "Authorization: token $RELEASE_TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@ -106,8 +102,6 @@ jobs:
|
|||||||
|
|
||||||
build-linux-arm64:
|
build-linux-arm64:
|
||||||
runs-on: linux-arm64
|
runs-on: linux-arm64
|
||||||
env:
|
|
||||||
RELEASE_TAG: ${{ github.ref_name }}
|
|
||||||
container:
|
container:
|
||||||
image: rust:1.88-slim
|
image: rust:1.88-slim
|
||||||
steps:
|
steps:
|
||||||
@ -137,7 +131,7 @@ jobs:
|
|||||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
API="http://172.0.0.29:3000/api/v1/repos/$GITHUB_REPOSITORY"
|
API="http://172.0.0.29:3000/api/v1/repos/$GITHUB_REPOSITORY"
|
||||||
TAG="$RELEASE_TAG"
|
TAG="$GITHUB_REF_NAME"
|
||||||
curl -sf -X POST "$API/releases" \
|
curl -sf -X POST "$API/releases" \
|
||||||
-H "Authorization: token $RELEASE_TOKEN" \
|
-H "Authorization: token $RELEASE_TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user