diff --git a/.env.amd64 b/.env.amd64 index 50b2ffbe0..3e4916808 100644 --- a/.env.amd64 +++ b/.env.amd64 @@ -4,3 +4,4 @@ # https://opensource.org/licenses/MIT export PKG_ARCH=amd64 +export NFPM_ARCH=amd64 diff --git a/.env.arm b/.env.arm index eff427369..6646a5f4c 100644 --- a/.env.arm +++ b/.env.arm @@ -7,4 +7,6 @@ export CC=arm-linux-gnueabihf-gcc export CC_PKG=gcc-arm-linux-gnueabihf export PKG_ARCH=armhf export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig +export GOARCH=arm export GOARM=7 +export NFPM_ARCH=arm7 diff --git a/.env.arm64 b/.env.arm64 index ed8af9fa3..a90530623 100644 --- a/.env.arm64 +++ b/.env.arm64 @@ -7,3 +7,5 @@ export CC=aarch64-linux-gnu-gcc export CC_PKG=gcc-aarch64-linux-gnu export PKG_ARCH=arm64 export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig +export GOARCH=arm64 +export NFPM_ARCH=arm64 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e00d7ebfc..2c4e89914 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: echo "::notice title=App Version::${APPVERSION}" - name: Add ${{ matrix.arch }} package repos - if: ${{ matrix.arch }} != "amd64" + if: ${{ matrix.arch }} != amd64 id: enable_multiarch run: | source .env.${{ matrix.arch }} @@ -105,7 +105,6 @@ jobs: go build -o dist/go-hass-agent-${{ matrix.arch }} env: CGO_ENABLED: 1 - GOARCH: ${{ matrix.arch }} MATRIX_ARCH: ${{ matrix.arch }} # - name: Build with fyne-cross @@ -118,7 +117,7 @@ jobs: - name: Create package id: nfpm_package run: | - export NFPM_ARCH=$(go env GOARCH)$(go env GOARM) + source .env.${{ matrix.arch }} nfpm package --config .nfpm.yaml --packager rpm --target dist nfpm package --config .nfpm.yaml --packager deb --target dist nfpm package --config .nfpm.yaml --packager archlinux --target dist @@ -141,6 +140,7 @@ jobs: COSIGN_PWD: ${{ secrets.COSIGN_PWD }} - name: Upload build artifacts + id: upload_artifacts if: ! ${{ steps.release_please.outputs.release_created }} uses: actions/upload-artifact@v4 with: @@ -148,6 +148,7 @@ jobs: path: dist/*.{rpm,deb,zst,sig} fync-cross/dist/linux-${{ matrix.arch }}/*.{tar.xz,sig} - name: Upload release artifacts + id: upload_release if: ${{ steps.release_please.outputs.release_created }} run: > gh release upload ${{ steps.release_please.outputs.tag_name }}