Skip to content

Build release artefacts #2

Build release artefacts

Build release artefacts #2

Workflow file for this run

name: Build release artefacts
run-name: Build release artefacts
on:
release:
types: [published]
jobs:
create-archive:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create archive
run: |
set -x
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
uses: actions/upload-artifact@v4
with:
name: tar
path: keycloak-httpd-client-install-*.tar.gz
retention-days: 1
build-fedora-rpm:
runs-on: ubuntu-latest
container: fedora:latest
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
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