From 8208733905dc000bb3f2f269f97bbb6ed8b08a3f Mon Sep 17 00:00:00 2001 From: Selfeer Date: Fri, 25 Oct 2024 16:37:17 +0400 Subject: [PATCH] try to release both ARM and AMD --- .github/workflows/release.yml | 60 ++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26cdd49..8cfe9e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,8 +8,25 @@ on: required: true jobs: - build-deb: + create-release: runs-on: [self-hosted, on-demand, type-cpx41, image-x86-app-docker-ce] + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} + steps: + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.event.inputs.version }} + release_name: Release ${{ github.event.inputs.version }} + draft: false + prerelease: false + + build-deb-amd64: + runs-on: [self-hosted, on-demand, type-cpx41, image-x86-app-docker-ce] + needs: create-release timeout-minutes: 180 steps: - name: Checkout code @@ -18,32 +35,53 @@ jobs: - name: Make build.sh executable run: chmod +x ./build - - name: Run build + - name: Run build for AMD64 run: ./build - name: Locate the .deb file id: locate_deb run: | DEB_FILE=$(find ./parquetify -name "parquetify_*_amd64.deb") + echo "DEB_FILE=$DEB_FILE" echo "::set-output name=deb_file::$DEB_FILE" - - name: Create GitHub Release - id: create_release - uses: actions/create-release@v1 + - name: Upload .deb to GitHub Releases + uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.event.inputs.version }} - release_name: Release ${{ github.event.inputs.version }} - draft: false - prerelease: false + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: ${{ steps.locate_deb.outputs.deb_file }} + asset_name: parquetify_${{ github.event.inputs.version }}_amd64.deb + asset_content_type: application/x-debian-package + + build-deb-arm64: + runs-on: [self-hosted, on-demand, type-cax41, image-arm-app-docker-ce] + needs: create-release + timeout-minutes: 180 + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Make build.sh executable + run: chmod +x ./build + + - name: Run build for ARM64 + run: ./build arm + + - name: Locate the .deb file + id: locate_deb + run: | + DEB_FILE=$(find ./parquetify -name "parquetify_*_arm64.deb") + echo "DEB_FILE=$DEB_FILE" + echo "::set-output name=deb_file::$DEB_FILE" - name: Upload .deb to GitHub Releases uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ needs.create-release.outputs.upload_url }} asset_path: ${{ steps.locate_deb.outputs.deb_file }} - asset_name: parquetify_${{ github.event.inputs.version }}_amd64.deb + asset_name: parquetify_${{ github.event.inputs.version }}_arm64.deb asset_content_type: application/x-debian-package