3636 needs :
3737 - test
3838 steps :
39+ - name : Set up Python 3.12
40+ uses : actions/setup-python@v5
41+ with :
42+ python-version : 3.12
43+
3944 - name : Get cASO repo
4045 uses : actions/checkout@v3
4146 with :
@@ -49,11 +54,16 @@ jobs:
4954 - name : Build sdist file
5055 run : poetry build
5156
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
5363 uses : actions/upload-artifact@v3
5464 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
5767
5868 - name : Update source distribution artifacts to release
5969 if : github.event_name == 'release'
6979 - test
7080 - build-sdist
7181 steps :
82+ - name : Set up Python 3.12
83+ uses : actions/setup-python@v5
84+ with :
85+ python-version : 3.12
86+
7287 - name : Get cASO repo
7388 uses : actions/checkout@v3
7489 with :
@@ -81,16 +96,25 @@ jobs:
8196 run : sudo apt-get install -y dpkg-dev debhelper devscripts lintian python3-pip tox dh-python python3-all python3-all-dev python3-pbr
8297
8398 - 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
85109
86110 - name : Download sdist artifact
87111 uses : actions/download-artifact@v3
88112 with :
89- name : caso-${{ github.ref_name }}.tar.gz
113+ name : caso-${{ env.VERSION }}.tar.gz
90114 path : dist
91115
92116 - 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
94118
95119 - name : Now build package
96120 run : dpkg-buildpackage -b
@@ -115,16 +139,26 @@ jobs:
115139 - build-sdist
116140 - test
117141 steps :
142+ - name : Set up Python 3.12
143+ uses : actions/setup-python@v5
144+ with :
145+ python-version : 3.12
146+
118147 - name : Get cASO repo
119148 uses : actions/checkout@v3
120149 with :
121150 repository : IFCA/caso
122151 ref : ${{ github.ref_name }}
152+
153+ - name : Write release version
154+ run : |
155+ TAG=${{ github.ref_name }}
156+ echo "VERSION=${TAG#v}" >> $GITHUB_ENV
123157
124158 - name : Download sdist artifact
125159 uses : actions/download-artifact@v3
126160 with :
127- name : caso-${{ github.ref_name }}.tar.gz
161+ name : caso-${{ env.VERSION }}.tar.gz
128162 path : dist
129163
130164 - name : debug
@@ -134,7 +168,7 @@ jobs:
134168 id : rpm
135169 uses : alvarolopez/rpmbuild@rockylinux9
136170 with :
137- source_file : dist/caso-${{ github.ref_name }}.tar.gz
171+ source_file : dist/caso-${{ env.VERSION }}.tar.gz
138172 spec_file : " packaging/redhat/caso.spec"
139173
140174 - name : Update RPM artifacts to release
0 commit comments