fix: use GitHub Actions expression syntax for VERSION
Some checks failed
CI / build-and-test (push) Has been cancelled
Release / build (amd64, linux) (push) Successful in 45s
Release / build (amd64, windows) (push) Successful in 54s
Release / build (amd64, darwin) (push) Successful in 1m8s
Release / build (arm64, darwin) (push) Successful in 1m6s
Release / build (arm64, linux) (push) Successful in 42s
Release / release (push) Successful in 25s
Some checks failed
CI / build-and-test (push) Has been cancelled
Release / build (amd64, linux) (push) Successful in 45s
Release / build (amd64, windows) (push) Successful in 54s
Release / build (amd64, darwin) (push) Successful in 1m8s
Release / build (arm64, darwin) (push) Successful in 1m6s
Release / build (arm64, linux) (push) Successful in 42s
Release / release (push) Successful in 25s
This commit is contained in:
@@ -32,17 +32,20 @@ jobs:
|
|||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
env:
|
||||||
|
GOPRIVATE: git.marketally.com
|
||||||
|
VERSION: ${{ github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
VERSION=${GITHUB_REF#refs/tags/v}
|
# Strip the v prefix from tag
|
||||||
|
VERSION="${VERSION#v}"
|
||||||
EXT=""
|
EXT=""
|
||||||
if [ "${{ matrix.goos }}" = "windows" ]; then
|
if [ "${{ matrix.goos }}" = "windows" ]; then
|
||||||
EXT=".exe"
|
EXT=".exe"
|
||||||
fi
|
fi
|
||||||
|
echo "Building version: ${VERSION}"
|
||||||
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} \
|
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} \
|
||||||
go build -ldflags "-X gitea.com/gitea/act_runner/internal/pkg/ver.version=${VERSION}" \
|
go build -ldflags "-X gitea.com/gitea/act_runner/internal/pkg/ver.version=${VERSION}" \
|
||||||
-o act_runner-${{ matrix.goos }}-${{ matrix.goarch }}${EXT}
|
-o act_runner-${{ matrix.goos }}-${{ matrix.goarch }}${EXT}
|
||||||
env:
|
|
||||||
GOPRIVATE: git.marketally.com
|
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user