@@ -20,6 +20,38 @@ concurrency:
2020 cancel-in-progress : true
2121
2222jobs :
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+
2355 # -- RPM builds --
2456
2557 # Build the Source RPM
@@ -36,29 +68,26 @@ jobs:
3668 version : 9
3769 runs-on : ubuntu-latest
3870 container : ${{ matrix.distro }}:${{ matrix.version }}
71+ env :
72+ TARBALL : " htgettoken-*.tar.*"
3973 steps :
40- - name : Get source code
41- uses : actions/checkout@v3
74+ - name : Download tarball
75+ uses : actions/download-artifact@v4
76+ with :
77+ name : tarball
4278
4379 - name : Configure SRPM build tools
4480 run : |
45- yum -y install \
46- make \
47- python-srpm-macros \
81+ dnf -y install \
82+ "*-srpm-macros" \
4883 rpm-build \
49- yum-utils \
5084 ;
5185
5286 - name : Create distributions
5387 run : make sources
5488
5589 - name : Create source package
56- run : |
57- rpmbuild \
58- --define "_sourcedir $(pwd)" \
59- --define "_srcrpmdir $(pwd)" \
60- -bs \
61- htgettoken.spec
90+ run : rpmbuild -ts --define "_srcrpmdir $(pwd)" ${TARBALL}
6291
6392 - uses : actions/upload-artifact@v4
6493 with :
@@ -96,24 +125,20 @@ jobs:
96125 dnf config-manager --set-enabled crb
97126
98127 - name : Configure EPEL
99- run : yum -y install epel-release
128+ run : dnf -y install epel-release
100129
101130 - name : Install build tools
102131 run : |
103- yum -y -q install \
132+ dnf -y -q install \
104133 rpm-build \
105- yum-utils \
134+ "dnf-command(builddep)" \
106135 ;
107136
108- - name : Install epel-rpm-macros
109- if : matrix.version < 9
110- run : yum -y -q install epel-rpm-macros
111-
112137 - name : Install build dependencies
113- run : yum- builddep -y htgettoken-*.src.rpm
138+ run : dnf builddep -y htgettoken-*.src.rpm
114139
115140 - name : List installed packages
116- run : yum list installed
141+ run : dnf list installed
117142
118143 - name : Build binary packages
119144 run : |
@@ -164,10 +189,10 @@ jobs:
164189 name : rpm-${{ matrix.distro }}-${{ matrix.version }}
165190
166191 - name : Configure EPEL
167- run : yum -y install epel-release
192+ run : dnf -y install epel-release
168193
169194 - name : Install RPMs
170- run : yum -y install *.rpm
195+ run : dnf -y install *.rpm
171196
172197 - name : Test htgettoken
173198 run : /usr/bin/htgettoken --help
0 commit comments