forked from jdennis/keycloak-httpd-client-install
-
Notifications
You must be signed in to change notification settings - Fork 2
72 lines (69 loc) · 2.22 KB
/
build-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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