From 48a84a1e5dd07473b752de32cca1772a2bfb0700 Mon Sep 17 00:00:00 2001 From: Lionel Henry Date: Thu, 25 Jan 2024 20:12:46 +0100 Subject: [PATCH] Merge all jobs Work around https://github.com/actions/upload-artifact/issues/485 --- .github/workflows/build-release-linux.yml | 54 +++++++++-------------- 1 file changed, 22 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build-release-linux.yml b/.github/workflows/build-release-linux.yml index cb1df6749e0..691cdb43757 100644 --- a/.github/workflows/build-release-linux.yml +++ b/.github/workflows/build-release-linux.yml @@ -17,10 +17,15 @@ on: type: string workflow_dispatch: +# Ideally we'd have the `vscode-linux-prepare-` and +# `vscode-linux-build-` steps in different jobs, but the +# upload-artifact action to send the Positron build to these jobs fails +# because of https://github.com/actions/upload-artifact/issues/485 + jobs: - build-positron: - name: Build Positron runs-on: ubuntu-latest + build-binaries: + name: Build Linux binaries timeout-minutes: 120 env: @@ -68,33 +73,10 @@ jobs: run: | yarn gulp vscode-linux-${{ matrix.arch }} - - name: Upload Positron build - uses: actions/upload-artifact@v4 - with: - name: positron-build-${{ matrix.arch }} - path: . - - build-binaries: - name: Create .deb and .rpm binaries - needs: [build-positron] - runs-on: ubuntu-latest - timeout-minutes: 60 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - strategy: - max-parallel: 1 - matrix: - arch: [x64] - pack: [deb, rpm] - steps: - - name: Download Positron build - uses: actions/download-artifact@v4 - with: - name: positron-build-${{ matrix.arch }} - - name: Prepare binary run: | - yarn gulp vscode-linux-${{ matrix.arch }}-prepare-${{ matrix.pack }} + yarn gulp vscode-linux-${{ matrix.arch }}-prepare-deb + yarn gulp vscode-linux-${{ matrix.arch }}-prepare-rpm # There is only .deb or .rpm file generated by the gulp "build" # step. The `*` globs in the `mv` command will match a single @@ -102,11 +84,19 @@ jobs: # filename. - name: Build binary run: | - yarn gulp vscode-linux-${{ matrix.arch }}-build-${{ matrix.pack }} - mv .build/linux/${{ matrix.pack }}/*/${{ matrix.pack }}/*.${{ matrix.pack }} Positron-${{ inputs.short_version }}.${{ matrix.pack }} + yarn gulp vscode-linux-${{ matrix.arch }}-build-deb + yarn gulp vscode-linux-${{ matrix.arch }}-build-rpm + mv .build/linux/deb/*/deb/*.deb Positron-${{ inputs.short_version }}.deb + mv .build/linux/rpm/*/rpm/*.rpm Positron-${{ inputs.short_version }}.rpm + + - name: Upload .rpm + uses: actions/upload-artifact@v4 + with: + name: positron-binary-rpm + path: Positron-${{ inputs.short_version }}.rpm - - name: Upload + - name: Upload .deb uses: actions/upload-artifact@v4 with: - name: positron-binary-${{ matrix.pack }} - path: Positron-${{ inputs.short_version }}.${{ matrix.pack }} + name: positron-binary-deb + path: Positron-${{ inputs.short_version }}.deb