Skip to content

Commit

Permalink
Use new tasks in build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-senechal committed Jan 22, 2024
1 parent ff90063 commit d20ffd8
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d20ffd8

Please sign in to comment.