Skip to content

Commit

Permalink
Merge all jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Jan 25, 2024
1 parent b4a887c commit 26b9bc1
Showing 1 changed file with 22 additions and 32 deletions.
54 changes: 22 additions & 32 deletions .github/workflows/build-release-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -68,45 +73,30 @@ 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
# file and are just a convenient way of matching the generated
# 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

0 comments on commit 26b9bc1

Please sign in to comment.