Skip to content

Commit

Permalink
Add el9 release rpm build and tar
Browse files Browse the repository at this point in the history
This workflow improvement build rpm for RHEL 9 and its variants and tar
archive.
  • Loading branch information
thalman committed Sep 13, 2024
1 parent d7fb027 commit 2d9208a
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,20 @@ jobs:
APP_VERSION=`grep -i '^version:' rpm/keycloak-httpd-client-install.spec | sed 's/.* //g'`
echo "APP_VERSION=$APP_VERSION" >> "$GITHUB_ENV"
git archive --format=tar.gz --prefix=keycloak-httpd-client-install-$APP_VERSION/ HEAD >keycloak-httpd-client-install-$APP_VERSION.tar.gz
- name: Upload tar archive
- name: Upload tar archive artifact
uses: actions/upload-artifact@v4
with:
name: tar
path: keycloak-httpd-client-install-*.tar.gz
retention-days: 1
- name: Upload tar archive into release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "./*.tar.gz"
tag: ${{ github.ref }}
overwrite: true
file_glob: true

build-fedora-rpm:
runs-on: ubuntu-latest
Expand All @@ -46,3 +54,27 @@ jobs:
tag: ${{ github.ref }}
overwrite: true
file_glob: true

build-el-rpm:
runs-on: ubuntu-latest
container: rockylinux:9
needs: create-archive
steps:
- name: Download tar
uses: actions/download-artifact@v4
with:
name: tar
- name: Build rpm
run: |
set -x
dnf -y install rpm-build python3-devel python3-setuptools
rpmbuild -D "_rpmdir $(pwd)/rpmbuild" -ta keycloak-httpd-client-install-*.tar.gz
find ./rpmbuild -name '*.rpm' -exec mv {} ./ \;
- name: Upload rpms release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "./*.rpm"
tag: ${{ github.ref }}
overwrite: true
file_glob: true

0 comments on commit 2d9208a

Please sign in to comment.