30
30
- name : Test with tox
31
31
run : tox
32
32
33
+ build-sdist :
34
+ runs-on : ubuntu-latest
35
+ needs :
36
+ - test
37
+ steps :
38
+ - name : Get cASO repo
39
+ uses : actions/checkout@v3
40
+ with :
41
+ ref : ${{ github.ref_name }}
42
+ - name : Build sdist file
43
+ run : python setup.py sdist
44
+
45
+ - name : Upload sidst to be used for other jobs
46
+ uses : actions/upload-artifact@v3
47
+ with :
48
+ path : dist/caso-${{ github.ref_name }}.tar.gz
49
+ name : caso-${{ github.ref_name }}.tar.gz
50
+
51
+ - name : Update source distribution artifacts to release
52
+ if : github.event_name == 'release'
53
+
54
+ with :
55
+ files : ' dist/*tar.gz'
56
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
57
+ release-tag : ${{ github.ref_name }}
58
+
33
59
build-deb :
34
60
runs-on : ubuntu-latest
35
- needs : test
61
+ needs :
62
+ - test
63
+ - build-sdist
36
64
steps :
37
65
- name : Get cASO repo
38
66
uses : actions/checkout@v3
@@ -42,33 +70,59 @@ jobs:
42
70
- name : Copy debian file into the correct place for the build
43
71
run : cp -r packaging/debian debian
44
72
45
- - name : Build Debian package
46
- uses : alvarolopez/action-debian-python-package@v4
73
+ - name : Install Debian deps
74
+ run : sudo apt-get install -y dpkg-dev debhelper devscripts lintian python3-pip tox dh-python python3-all python3-all-dev python3-pbr
75
+
76
+ - name : Install dependencies
77
+ run : pip install -r requirements.txt
78
+
79
+ - name : Download sdist artifact
80
+ uses : actions/download-artifact@v3
47
81
with :
48
- artifacts_directory : output
49
- os_distribution : stable
82
+ name : caso-${{ github.ref_name }}.tar.gz
83
+ path : dist
84
+
85
+ - name : Copy sdist to expected debian source file
86
+ run : cp dist/caso-${{ github.ref_name }}.tar.gz ../caso-${{ github.ref_name }}.orig.tar.gz
87
+
88
+ - name : Now build package
89
+ run : dpkg-buildpackage -b
90
+
91
+ - name : debug
92
+ run : ls
93
+
94
+ - name : debug
95
+ run : ls ..
50
96
51
97
- name : Update DEB artifacts to release
52
98
if : github.event_name == 'release'
53
99
54
100
with :
55
- files : ' output /*deb'
101
+ files : ' .. /*deb'
56
102
repo-token : ${{ secrets.GITHUB_TOKEN }}
57
103
release-tag : ${{ github.ref_name }}
58
104
59
105
build-rpm :
60
106
runs-on : ubuntu-latest
61
- needs : test
107
+ needs :
108
+ - build-sdist
109
+ - test
62
110
steps :
63
111
- name : Get cASO repo
64
112
uses : actions/checkout@v3
65
113
with :
66
114
repository : IFCA/caso
67
115
ref : ${{ github.ref_name }}
68
116
69
- - name : Build sdist to use as source
70
- run : python setup.py sdist
117
+ - name : Download sdist artifact
118
+ uses : actions/download-artifact@v3
119
+ with :
120
+ name : caso-${{ github.ref_name }}.tar.gz
121
+ path : dist
71
122
123
+ - name : debug
124
+ run : ls
125
+
72
126
- name : Build RPM package
73
127
id : rpm
74
128
uses : alvarolopez/rpmbuild@rockylinux9
0 commit comments