diff --git a/.github/workflows/rust_create_release.yml b/.github/workflows/rust_create_release.yml index 3c435fc..9da5f32 100644 --- a/.github/workflows/rust_create_release.yml +++ b/.github/workflows/rust_create_release.yml @@ -64,16 +64,21 @@ jobs: cargo install cross if: contains(matrix.os, 'ubuntu') - name: Build release binaries - run: | - cargo build --release - cargo build --release --no-default-features --target-dir nogui + run: cargo build --release - name: Build Windows release binaries with Edge if: contains(matrix.os, 'windows') - run: | - cargo build --release --features "edge" --target-dir edge - - name: Build ARMv7 binary - run: cross build --release --no-default-features --target armv7-unknown-linux-gnueabihf + run: cargo build --release --features "edge" --target-dir edge + - name: Build and package deb packages if: contains(matrix.os, 'ubuntu') + run: | + PKGARCH=amd64 contrib/deb/generate.sh + PKGARCH=i686 contrib/deb/generate.sh + PKGARCH=mips contrib/deb/generate.sh + PKGARCH=mipsel contrib/deb/generate.sh + PKGARCH=armhf contrib/deb/generate.sh + PKGARCH=arm64 contrib/deb/generate.sh + hub release edit $(find . -type f -name "*.deb" -printf "-a %p ") -m "" "${{ env.VERSION }}" + - name: win_arch run: | echo "BIN_ARCH=windows-amd64" >> $GITHUB_ENV @@ -96,8 +101,6 @@ jobs: echo "ZIP_NAME=alfis-${{env.BIN_ARCH}}-${{ needs.get_version.outputs.project_version }}.zip" >> $GITHUB_ENV echo "BIN_PATH_NOGUI=./nogui/release/alfis" >> $GITHUB_ENV echo "ZIP_NAME_NOGUI=alfis-${{env.BIN_ARCH}}-${{ needs.get_version.outputs.project_version }}-nogui.zip" >> $GITHUB_ENV - echo "BIN_ARM_PATH=./target/armv7-unknown-linux-gnueabihf/release/alfis" >> $GITHUB_ENV - echo "ZIP_ARM_NAME=alfis-armv7-${{ needs.get_version.outputs.project_version }}-nogui.zip" >> $GITHUB_ENV - name: Windows variables if: contains(matrix.os, 'windows') run: | @@ -107,6 +110,7 @@ jobs: echo "ZIP_NAME_NOGUI=alfis-${{env.BIN_ARCH}}-${{ needs.get_version.outputs.project_version }}-nogui.zip" >> $GITHUB_ENV echo "BIN_PATH_EDGE=edge/release/alfis.exe" >> $GITHUB_ENV echo "ZIP_NAME_EDGE=alfis-${{env.BIN_ARCH}}-${{ needs.get_version.outputs.project_version }}-edge.zip" >> $GITHUB_ENV + - name: Packaging uses: papeloto/action-zip@v1 with: @@ -123,12 +127,7 @@ jobs: with: files: ${{ env.BIN_PATH_EDGE }} alfis.toml README.md LICENSE adblock.txt dest: ${{ env.ZIP_NAME_EDGE }} - - name: Packaging ARM - uses: papeloto/action-zip@v1 - with: - files: ${{ env.BIN_ARM_PATH }} alfis.toml README.md LICENSE adblock.txt - dest: ${{ env.ZIP_ARM_NAME }} - if: contains(matrix.os, 'ubuntu') + - name: Upload binary id: upload-binary uses: actions/upload-release-asset@v1 @@ -139,6 +138,7 @@ jobs: asset_path: ${{ env.ZIP_NAME }} asset_name: ${{ env.ZIP_NAME }} asset_content_type: application/zip + - name: Upload no GUI binary id: upload-nogui-binary uses: actions/upload-release-asset@v1 @@ -149,6 +149,7 @@ jobs: asset_path: ${{ env.ZIP_NAME_NOGUI }} asset_name: ${{ env.ZIP_NAME_NOGUI }} asset_content_type: application/zip + - name: Upload Edge binary if: contains(matrix.os, 'windows') id: upload-edge-binary @@ -160,14 +161,3 @@ jobs: asset_path: ${{ env.ZIP_NAME_EDGE }} asset_name: ${{ env.ZIP_NAME_EDGE }} asset_content_type: application/zip - - name: Upload ARM binary - id: upload-arm-binary - if: contains(matrix.os, 'ubuntu') - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.make_release.outputs.upload_url }} - asset_path: ${{ env.ZIP_ARM_NAME }} - asset_name: ${{ env.ZIP_ARM_NAME }} - asset_content_type: application/zip