@@ -51,33 +51,38 @@ jobs:
5151 needs : tests
5252 runs-on : ubuntu-latest
5353 steps :
54- - uses : actions/checkout@v2
55- - name : Set up Python ${{ env.python-version }}
56- uses : actions/setup-python@v2
57- with :
58- python-version : ${{ env.python-version }}
59- - name : Install pypa/build
60- run : >-
61- python -m
62- pip install
63- build
64- --user
65- - name : Build a binary wheel and a source tarball
66- run : >-
67- python -m
68- build
69- --sdist
70- --wheel
71- --outdir dist/
72- - name : Publish distribution 📦 to Test PyPI
73- if : github.ref == 'refs/heads/master'
74- uses : pypa/gh-action-pypi-publish@master
75- with :
76- password : ${{ secrets.TEST_PYPI_API_TOKEN }}
77- repository_url : https://test.pypi.org/legacy/
78- skip_existing : true
79- - name : Publish distribution 📦 to PyPI
80- if : github.event_name == 'release'
81- uses : pypa/gh-action-pypi-publish@master
82- with :
83- password : ${{ secrets.PYPI_API_TOKEN }}
54+ - uses : actions/checkout@v2
55+ - name : Set up Python ${{ env.python-version }}
56+ uses : actions/setup-python@v2
57+ with :
58+ python-version : ${{ env.python-version }}
59+ - name : Install pypa/build
60+ run : python -m pip install build --user
61+ - name : Build a binary wheel and a source tarball
62+ run : python -m build --sdist --wheel --outdir dist/
63+ - name : Prepare RPM package
64+ # if: github.event_name == 'release'
65+ run : python setup.py bdist_rpm
66+ - name : Copy spec file
67+ # if: github.event_name == 'release'
68+ run : cp agent360.spec build/bdist.linux-x86_64/rpm/SPECS/agent360.spec
69+ - name : Build RPM package
70+ # if: github.event_name == 'release'
71+ run : rpmbuild -ba --define "__python python3" --define "_topdir $PWD/build/bdist.linux-x86_64/rpm" --clean ./build/bdist.linux-x86_64/rpm/SPECS/agent360.spec
72+ - uses : actions/upload-artifact@v4
73+ # if: github.event_name == 'release'
74+ with :
75+ name : rpm package
76+ path : build/bdist.linux-x86_64/rpm/SRPMS/*.rpm
77+ - name : Publish distribution 📦 to Test PyPI
78+ if : github.ref == 'refs/heads/master'
79+ uses : pypa/gh-action-pypi-publish@master
80+ with :
81+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
82+ repository_url : https://test.pypi.org/legacy/
83+ skip_existing : true
84+ - name : Publish distribution 📦 to PyPI
85+ if : github.event_name == 'release'
86+ uses : pypa/gh-action-pypi-publish@master
87+ with :
88+ password : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments