Optimize workflow to use single build job
Co-authored-by: wheaney <42350981+wheaney@users.noreply.github.com>
This commit is contained in:
parent
7a683640df
commit
98893acbc6
|
|
@ -38,7 +38,7 @@ jobs:
|
|||
echo "should-release=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
build-libs:
|
||||
build:
|
||||
needs: check-version-change
|
||||
if: needs.check-version-change.outputs.should-release == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -55,37 +55,18 @@ jobs:
|
|||
run: |
|
||||
bin/package_libs
|
||||
|
||||
- name: Upload library artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: libs
|
||||
path: out/breezy*-libs-*.tar.gz
|
||||
|
||||
build-packages:
|
||||
needs: check-version-change
|
||||
if: needs.check-version-change.outputs.should-release == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build all packages
|
||||
run: |
|
||||
bin/package_all
|
||||
|
||||
- name: Upload package artifacts
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: packages
|
||||
path: out/breezy*.tar.gz
|
||||
name: release-artifacts
|
||||
path: out/*.tar.gz
|
||||
|
||||
create-release:
|
||||
needs: [check-version-change, build-libs, build-packages]
|
||||
needs: [check-version-change, build]
|
||||
if: needs.check-version-change.outputs.should-release == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
|
|
@ -94,16 +75,10 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download library artifacts
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: libs
|
||||
path: artifacts
|
||||
|
||||
- name: Download package artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: packages
|
||||
name: release-artifacts
|
||||
path: artifacts
|
||||
|
||||
- name: Create Release
|
||||
|
|
|
|||
Loading…
Reference in New Issue