test: env.RELEASE_VERSION

This commit is contained in:
CyberL1 2025-02-16 09:58:03 +01:00
parent 2b11bb9d55
commit c0c1d3cb42

View File

@ -28,11 +28,13 @@ jobs:
uses: actions/setup-go@v4 uses: actions/setup-go@v4
with: with:
go-version: '1.23' go-version: '1.23'
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Build binary - name: Build binary
run: | run: |
export GOOS=${{ matrix.os }} export GOOS=${{ matrix.os }}
export GOARCH=${{ matrix.arch }} export GOARCH=${{ matrix.arch }}
go build -ldflags "-X holesail-proxy/utils.Version=1" go build -ldflags "-X holesail-proxy/utils.Version=${{ env.RELEASE_VERSION }}"
- name: Pack binary - name: Pack binary
run: zip holesail-proxy-${{ matrix.os }}-${{ matrix.arch }}.zip holesail-proxy${{ matrix.os == 'windows' && '.exe' || '' }} run: zip holesail-proxy-${{ matrix.os }}-${{ matrix.arch }}.zip holesail-proxy${{ matrix.os == 'windows' && '.exe' || '' }}
- name: Create release - name: Create release