From d20ffd8727f1e32de7f02b7d59703c11f16e1f17 Mon Sep 17 00:00:00 2001 From: thomas-senechal Date: Mon, 22 Jan 2024 23:43:19 +0100 Subject: [PATCH] Use new tasks in build workflow --- .github/workflows/build.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 811a0f3db..11d9ba802 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,21 +51,23 @@ jobs: run: go install fyne.io/fyne/v2/cmd/fyne@latest - name: Set environment variables run: | - echo "GOOS=${{ matrix.target }}" >> $GITHUB_ENV - echo "GOARCH=${{ matrix.arch }}" >> $GITHUB_ENV echo "CGO_ENABLED=1" >> $GITHUB_ENV echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV - - name: Build binary for ${{ matrix.target }} on ${{ matrix.arch}} + - name: Build binary for ${{ matrix.target }} on ${{ matrix.arch }} shell: bash run: | - go build -ldflags "-X github.com/massalabs/station/int/config.Version=${{env.VERSION}}" -o massastation_${{ matrix.target }}_${{ matrix.arch }}${{ matrix.ext }} ./cmd/massastation/ + task ${{ matrix.target }}:build-prod VERSION=${{ env.VERSION }} ARCH=${{ matrix.arch }} + cp ./build/massastation/massastation${{ matrix.ext }} . - name: Package binary for ${{ matrix.target }} on ${{ matrix.arch}} - # We don't need to package for windows since fyne package generates a similar .exe as go build. + # We don't need to package for windows since Fyne package generates a similar .exe as go build. if: matrix.target != 'windows' shell: bash run: | - cp massastation_${{ matrix.target }}_${{ matrix.arch }} massastation - fyne package -name MassaStation -icon ./int/systray/embedded/logo.png -appID net.massalabs.massastation -exe massastation + task package + - name: Rename binary for ${{ matrix.target }} on ${{ matrix.arch }} + shell: bash + run: | + mv ./massastation${{ matrix.ext }} massastation_${{ matrix.target }}_${{ matrix.arch }}${{ matrix.ext }} - name: Upload MassaStation Binary uses: actions/upload-artifact@v3 with: