forked from cobbler/cobbler
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (77 loc) · 2.33 KB
/
release_master.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
73
74
75
76
77
78
79
80
81
name: Publish Python distributions to TestPyPI
on:
push:
branches:
- main
env:
DATAPATH: "/usr/share/cobbler"
DOCPATH: "/usr/share/man"
ETCPATH: "/etc/cobbler"
LIBPATH: "/var/lib/cobbler"
LOGPATH: "/var/log"
COMPLETION_PATH: "/usr/share/bash-completion/completions"
STATEPATH: "/tmp/cobbler_settings/devinstall"
HTTPD_SERVICE: "apache2.service"
WEBROOT: "/var/www"
WEBCONFIG: "/etc/apache2/sites-available"
WEBROOTCONFIG: "/etc/apache2"
TFTPROOT: "/srv/tftpboot"
DEFAULTPATH: "etc/sysconfig"
APACHE_USER: "www-data"
HTTP_USER: "www-data"
APACHE_GROUP: "www-data"
# FIXME: We removed createrepo_c due to: https://answers.launchpad.net/createrepo/+question/690448
jobs:
build-n-publish:
name: Build and publish Python distributions to TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Update package cache
run: sudo apt-get -yq update
- name: Install all dependencies
run: >-
sudo apt-get -yq install
wget
pycodestyle
pyflakes3
liblocale-gettext-perl
lsb-release
xz-utils
bzip2
dpkg-dev
tftpd-hpa
rsync
xorriso
fence-agents
fakeroot
patch
pax
git
hardlink
apache2
apache2-dev
python3-gunicorn
systemd
libsasl2-dev
- name: Install Deps for installing project
run: pip install Sphinx coverage wheel
- name: Fetch date for version bump
run: echo "new_version=$(date +'%Y%m%d%H%M')" >> $GITHUB_ENV
- name: Replace version in setup.py
run: sed -i '/VERSION = "[0-9].[0-9].[0-9]/s/.$/.'${{ env.new_version }}'"/g' setup.py
- name: Install Deps with pip
run: pip install .
- name: Install pypa/build
run: python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python setup.py sdist bdist_wheel
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/