36
36
needs :
37
37
- test
38
38
steps :
39
+ - name : Set up Python 3.12
40
+ uses : actions/setup-python@v5
41
+ with :
42
+ python-version : 3.12
43
+
39
44
- name : Get cASO repo
40
45
uses : actions/checkout@v3
41
46
with :
@@ -49,11 +54,16 @@ jobs:
49
54
- name : Build sdist file
50
55
run : poetry build
51
56
52
- - name : Upload sidst to be used for other jobs
57
+ - name : Write release version
58
+ run : |
59
+ TAG=${{ github.ref_name }}
60
+ echo "VERSION=${TAG#v}" >> $GITHUB_ENV
61
+
62
+ - name : Upload sdist to be used for other jobs
53
63
uses : actions/upload-artifact@v3
54
64
with :
55
- path : dist/caso-${{ github.ref_name }}.tar.gz
56
- name : caso-${{ github.ref_name }}.tar.gz
65
+ path : dist/caso-${{ env.VERSION }}.tar.gz
66
+ name : caso-${{ env.VERSION }}.tar.gz
57
67
58
68
- name : Update source distribution artifacts to release
59
69
if : github.event_name == 'release'
69
79
- test
70
80
- build-sdist
71
81
steps :
82
+ - name : Set up Python 3.12
83
+ uses : actions/setup-python@v5
84
+ with :
85
+ python-version : 3.12
86
+
72
87
- name : Get cASO repo
73
88
uses : actions/checkout@v3
74
89
with :
@@ -81,16 +96,25 @@ jobs:
81
96
run : sudo apt-get install -y dpkg-dev debhelper devscripts lintian python3-pip tox dh-python python3-all python3-all-dev python3-pbr
82
97
83
98
- name : Install dependencies
84
- run : pip install -r requirements.txt
99
+ run : |
100
+ python -m pip install --upgrade pip
101
+ python -m pip install tox tox-gh-actions
102
+ python -m pip install poetry poetry poetry-plugin-export
103
+ poetry install
104
+
105
+ - name : Write release version
106
+ run : |
107
+ TAG=${{ github.ref_name }}
108
+ echo "VERSION=${TAG#v}" >> $GITHUB_ENV
85
109
86
110
- name : Download sdist artifact
87
111
uses : actions/download-artifact@v3
88
112
with :
89
- name : caso-${{ github.ref_name }}.tar.gz
113
+ name : caso-${{ env.VERSION }}.tar.gz
90
114
path : dist
91
115
92
116
- name : Copy sdist to expected debian source file
93
- run : cp dist/caso-${{ github.ref_name }}.tar.gz ../caso-${{ github.ref_name }}.orig.tar.gz
117
+ run : cp dist/caso-${{ env.VERSION }}.tar.gz ../caso-${{ env.VERSION }}.orig.tar.gz
94
118
95
119
- name : Now build package
96
120
run : dpkg-buildpackage -b
@@ -115,16 +139,26 @@ jobs:
115
139
- build-sdist
116
140
- test
117
141
steps :
142
+ - name : Set up Python 3.12
143
+ uses : actions/setup-python@v5
144
+ with :
145
+ python-version : 3.12
146
+
118
147
- name : Get cASO repo
119
148
uses : actions/checkout@v3
120
149
with :
121
150
repository : IFCA/caso
122
151
ref : ${{ github.ref_name }}
152
+
153
+ - name : Write release version
154
+ run : |
155
+ TAG=${{ github.ref_name }}
156
+ echo "VERSION=${TAG#v}" >> $GITHUB_ENV
123
157
124
158
- name : Download sdist artifact
125
159
uses : actions/download-artifact@v3
126
160
with :
127
- name : caso-${{ github.ref_name }}.tar.gz
161
+ name : caso-${{ env.VERSION }}.tar.gz
128
162
path : dist
129
163
130
164
- name : debug
@@ -134,7 +168,7 @@ jobs:
134
168
id : rpm
135
169
uses : alvarolopez/rpmbuild@rockylinux9
136
170
with :
137
- source_file : dist/caso-${{ github.ref_name }}.tar.gz
171
+ source_file : dist/caso-${{ env.VERSION }}.tar.gz
138
172
spec_file : " packaging/redhat/caso.spec"
139
173
140
174
- name : Update RPM artifacts to release
0 commit comments