@@ -20,11 +20,45 @@ concurrency:
20
20
cancel-in-progress : true
21
21
22
22
jobs :
23
+ tarball :
24
+ name : Tarball
25
+
26
+ runs-on : ubuntu-latest
27
+
28
+ steps :
29
+ - name : Get source code
30
+ uses : actions/checkout@v4
31
+
32
+ - name : Set up Python ${{ matrix.python-version }}
33
+ uses : actions/setup-python@v5
34
+ with :
35
+ python-version : ' 3.x'
36
+
37
+ - name : Install build requirements
38
+ run : python -m pip install build
39
+
40
+ - name : Create distributions
41
+ run : python -m build . --sdist --wheel --outdir .
42
+
43
+ - uses : actions/upload-artifact@v4
44
+ with :
45
+ name : tarball
46
+ path : htgettoken-*.tar.*
47
+ if-no-files-found : error
48
+
49
+ - uses : actions/upload-artifact@v4
50
+ with :
51
+ name : wheel
52
+ path : htgettoken*.whl
53
+ if-no-files-found : error
54
+
23
55
# -- RPM builds --
24
56
25
57
# Build the Source RPM
26
58
rhel-srpm :
27
59
name : EL ${{ matrix.version }} (${{ matrix.distro }}) source package
60
+ needs :
61
+ - tarball
28
62
strategy :
29
63
fail-fast : false
30
64
matrix :
@@ -36,29 +70,23 @@ jobs:
36
70
version : 9
37
71
runs-on : ubuntu-latest
38
72
container : ${{ matrix.distro }}:${{ matrix.version }}
73
+ env :
74
+ TARBALL : " htgettoken-*.tar.*"
39
75
steps :
40
- - name : Get source code
41
- uses : actions/checkout@v3
76
+ - name : Download tarball
77
+ uses : actions/download-artifact@v4
78
+ with :
79
+ name : tarball
42
80
43
81
- name : Configure SRPM build tools
44
82
run : |
45
- yum -y install \
46
- make \
47
- python-srpm-macros \
83
+ dnf -y install \
84
+ "*-srpm-macros" \
48
85
rpm-build \
49
- yum-utils \
50
86
;
51
87
52
- - name : Create distributions
53
- run : make sources
54
-
55
88
- name : Create source package
56
- run : |
57
- rpmbuild \
58
- --define "_sourcedir $(pwd)" \
59
- --define "_srcrpmdir $(pwd)" \
60
- -bs \
61
- htgettoken.spec
89
+ run : rpmbuild -ts --define "_srcrpmdir $(pwd)" ${TARBALL}
62
90
63
91
- uses : actions/upload-artifact@v4
64
92
with :
@@ -96,24 +124,20 @@ jobs:
96
124
dnf config-manager --set-enabled crb
97
125
98
126
- name : Configure EPEL
99
- run : yum -y install epel-release
127
+ run : dnf -y install epel-release
100
128
101
129
- name : Install build tools
102
130
run : |
103
- yum -y -q install \
131
+ dnf -y -q install \
104
132
rpm-build \
105
- yum-utils \
133
+ "dnf-command(builddep)" \
106
134
;
107
135
108
- - name : Install epel-rpm-macros
109
- if : matrix.version < 9
110
- run : yum -y -q install epel-rpm-macros
111
-
112
136
- name : Install build dependencies
113
- run : yum- builddep -y htgettoken-*.src.rpm
137
+ run : dnf builddep -y htgettoken-*.src.rpm
114
138
115
139
- name : List installed packages
116
- run : yum list installed
140
+ run : dnf list installed
117
141
118
142
- name : Build binary packages
119
143
run : |
@@ -164,10 +188,10 @@ jobs:
164
188
name : rpm-${{ matrix.distro }}-${{ matrix.version }}
165
189
166
190
- name : Configure EPEL
167
- run : yum -y install epel-release
191
+ run : dnf -y install epel-release
168
192
169
193
- name : Install RPMs
170
- run : yum -y install *.rpm
194
+ run : dnf -y install *.rpm
171
195
172
196
- name : Test htgettoken
173
197
run : /usr/bin/htgettoken --help
0 commit comments