@@ -230,13 +230,13 @@ jobs:
230230 # The "move-ferron2-archive" is a custom command that moves the ZIP archive to be served by the download server
231231 ssh ferron-servers "sudo move-ferron2-archive ${{ env.FERRON_VERSION }} ${{ matrix.target }}"
232232
233- # - name: Release Ferron to GitHub
234- # uses: ncipollo/release-action@v1
235- # with:
236- # allowUpdates: true
237- # artifacts: "ferron-${{ env.FERRON_VERSION }}-${{ matrix.target }}.zip"
238- # tag: "${{ env.FERRON_VERSION }}"
239- # commit: "main "
233+ - name : Release Ferron to GitHub
234+ uses : ncipollo/release-action@v1
235+ with :
236+ allowUpdates : true
237+ artifacts : " ferron-${{ env.FERRON_VERSION }}-${{ matrix.target }}.zip"
238+ tag : " ${{ env.FERRON_VERSION }}"
239+ commit : " 2.x "
240240
241241 - name : Build and release Debian package
242242 if : matrix.runner == 'warp-ubuntu-latest-x64-8x' && contains(matrix.target, 'linux-gnu')
@@ -253,6 +253,21 @@ jobs:
253253 # The "update-ferron-deb-repo" is a custom command that updates the Debian repository
254254 ssh ferron-servers "sudo update-ferron-deb-repo $DEB_PACKAGE_VERSION $DEB_ARCHITECTURE"
255255
256+ - name : Build and release RPM package
257+ if : matrix.runner == 'warp-ubuntu-latest-x64-8x' && contains(matrix.target, 'linux-gnu')
258+ shell : bash
259+ run : |
260+ packaging/rpm/build.sh ${{ matrix.target }} ${{ env.FERRON_VERSION }} target/${{ matrix.target }}/release
261+
262+ RPM_FILE_NAME_WO_RPM=$(ls dist/*.rpm | head -n 1 | sed -E 's|^dist/||' | sed -E 's/\.rpm$//')
263+ RPM_PACKAGE_VERSION=$(echo $RPM_FILE_NAME_WO_RPM | cut -d'-' -f2)
264+ RPM_ARCHITECTURE=$(echo $RPM_FILE_NAME_WO_RPM | rev | cut -d'.' -f1 | rev)
265+ ssh ferron-servers "mkdir -p rpm || true"
266+ scp dist/${RPM_FILE_NAME_WO_RPM}.rpm ferron-servers:rpm/${RPM_FILE_NAME_WO_RPM}.rpm
267+
268+ # The "update-ferron-rpm-repo" is a custom command that updates the RPM repository
269+ ssh ferron-servers "sudo update-ferron-rpm-repo $RPM_PACKAGE_VERSION $RPM_ARCHITECTURE"
270+
256271 docs :
257272 runs-on : warp-ubuntu-latest-x64-8x
258273
@@ -360,11 +375,11 @@ jobs:
360375 TAG_TYPE=${{ matrix.group }}
361376 FERRON_MAJOR_VERSION=$(echo "$FERRON_VERSION" | cut -d '.' -f 1)
362377 if [ "$TAG_TYPE" = "latest" ] || [ "$TAG_TYPE" = "" ]; then
363- DOCKER_HUB_TAGS="ferronserver/ferron:$FERRON_VERSION,ferronserver/ferron:$FERRON_MAJOR_VERSION"
364- DOCKER_GHCR_TAGS="ghcr.io/ferronweb/ferron:$FERRON_VERSION,ghcr.io/ferronweb/ferron:$FERRON_MAJOR_VERSION"
378+ DOCKER_HUB_TAGS="ferronserver/ferron:$FERRON_VERSION,ferronserver/ferron:$FERRON_MAJOR_VERSION,ferronserver/ferron:latest "
379+ DOCKER_GHCR_TAGS="ghcr.io/ferronweb/ferron:$FERRON_VERSION,ghcr.io/ferronweb/ferron:$FERRON_MAJOR_VERSION,ghcr.io/ferronweb/ferron:latest "
365380 else
366- DOCKER_HUB_TAGS="ferronserver/ferron:$FERRON_VERSION-$TAG_TYPE,ferronserver/ferron:$FERRON_MAJOR_VERSION-$TAG_TYPE"
367- DOCKER_GHCR_TAGS="ghcr.io/ferronweb/ferron:$FERRON_VERSION-$TAG_TYPE,ghcr.io/ferronweb/ferron:$FERRON_MAJOR_VERSION-$TAG_TYPE"
381+ DOCKER_HUB_TAGS="ferronserver/ferron:$FERRON_VERSION-$TAG_TYPE,ferronserver/ferron:$FERRON_MAJOR_VERSION-$TAG_TYPE,ferronserver/ferron:$TAG_TYPE "
382+ DOCKER_GHCR_TAGS="ghcr.io/ferronweb/ferron:$FERRON_VERSION-$TAG_TYPE,ghcr.io/ferronweb/ferron:$FERRON_MAJOR_VERSION-$TAG_TYPE,ghcr.io/ferronweb/ferron:$TAG_TYPE "
368383 fi
369384 echo "DOCKER_TAGS=$DOCKER_HUB_TAGS,$DOCKER_GHCR_TAGS" >> $GITHUB_ENV
370385
0 commit comments