Skip to content

Commit

Permalink
Merge pull request #545 from diffblue/ebmc-packages-fixup3
Browse files Browse the repository at this point in the history
Fix ebmc release workflow
  • Loading branch information
tautschnig authored Jun 14, 2024
2 parents 20b2ce9 + 770f368 commit d2a8af0
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/ebmc-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:

perform-draft-release:
name: Perform Draft Release
id: draft_release
runs-on: ubuntu-20.04
needs: [get-version-information]
steps:
Expand All @@ -42,6 +43,7 @@ jobs:
ubuntu-22_04-package:
name: Package for Ubuntu 22.04
runs-on: ubuntu-22.04
needs: [perform-draft-release]
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -95,24 +97,20 @@ jobs:
deb_package_name="$(ls *.deb)"
echo "deb_package=./build/$deb_package_name" >> $GITHUB_OUTPUT
echo "deb_package_name=ubuntu-22.04-$deb_package_name" >> $GITHUB_OUTPUT
- name: Get release info
id: get_release_info
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload binary packages
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
upload_url: ${{ steps.draft_release.outputs.upload_url }}
asset_path: ${{ steps.create_packages.outputs.deb_package }}
asset_name: ${{ steps.create_packages.outputs.deb_package_name }}
asset_content_type: application/x-deb

centos8-package:
name: Package for CentOS 8
runs-on: ubuntu-22.04
needs: [perform-draft-release]
container:
image: centos:8
steps:
Expand Down Expand Up @@ -152,6 +150,7 @@ jobs:
- name: Create .rpm
run: |
VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3 | cut -d "-" -f 2)
SRC=`pwd`
rpmdev-setuptree
cat > ~/rpmbuild/SPECS/ebmc.spec << EOM
Expand Down Expand Up @@ -185,20 +184,18 @@ jobs:
echo Building ebmc-${VERSION}-1.x86_64.rpm
(cd ~/rpmbuild/SPECS ; rpmbuild -v -bb ebmc.spec )
- name: Get release info
id: get_release_info
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
rpm_package_name=ebmc-${VERSION}-1.x86_64.rpm
echo "rpm_package=~/rpmbuild/SPECS/$rpm_package_name" >> $GITHUB_OUTPUT
echo "rpm_package_name=centos8-$rpm_package_name" >> $GITHUB_OUTPUT
- name: Upload binary packages
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: ${{ steps.create_packages.outputs.deb_package }}
asset_name: ${{ steps.create_packages.outputs.deb_package_name }}
asset_content_type: application/x-deb
upload_url: ${{ steps.draft_release.outputs.upload_url }}
asset_path: ${{ steps.create_packages.outputs.rpm_package }}
asset_name: ${{ steps.create_packages.outputs.rpm_package_name }}
asset_content_type: application/x-rpm

perform-release:
name: Perform Release
Expand Down

0 comments on commit d2a8af0

Please sign in to comment.