mirror of
https://github.com/elyby/chrly.git
synced 2024-11-26 08:42:14 +05:30
Fix version generation
This commit is contained in:
parent
8959e53270
commit
6cb5e1eb42
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@ -39,7 +39,8 @@ jobs:
|
|||||||
SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)
|
SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)
|
||||||
VERSION="${BRANCH_NAME}-${SHORT_SHA}"
|
VERSION="${BRANCH_NAME}-${SHORT_SHA}"
|
||||||
fi
|
fi
|
||||||
echo "version=$VERSION" >> $GITHUB_ENV
|
echo "### Version: $VERSION" >> $GITHUB_STEP_SUMMARY
|
||||||
|
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
@ -62,4 +63,4 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
build-args: |
|
build-args: |
|
||||||
VERSION=${{ steps.version.output.version }}
|
VERSION=${{ steps.version.output.version }}
|
||||||
COMMIT=${{ github.ref }}
|
COMMIT=${{ github.sha }}
|
||||||
|
@ -12,8 +12,7 @@ RUN go mod download
|
|||||||
RUN CGO_ENABLED=0 \
|
RUN CGO_ENABLED=0 \
|
||||||
go build \
|
go build \
|
||||||
-trimpath \
|
-trimpath \
|
||||||
-ldflags "-X github.com/elyby/chrly/version.version=$VERSION -X github.com/elyby/chrly/version.commit=$COMMIT" \
|
-ldflags "-w -s -X github.com/elyby/chrly/version.version=$VERSION -X github.com/elyby/chrly/version.commit=$COMMIT" \
|
||||||
-ldflags="-w -s" \
|
|
||||||
-o chrly \
|
-o chrly \
|
||||||
main.go
|
main.go
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user