@@ -756,6 +756,43 @@ jobs:
756
756
757
757
steps :
758
758
- uses : actions/checkout@v4
759
+ - uses : actions/download-artifact@v4
760
+ with :
761
+ name : Linux-Installer-Build
762
+ - uses : actions/download-artifact@v4
763
+ with :
764
+ name : RPM-Build
765
+ - uses : actions/download-artifact@v4
766
+ with :
767
+ name : Debian-Build
768
+ - uses : actions/download-artifact@v4
769
+ with :
770
+ name : Snap-Build
771
+ - uses : actions/download-artifact@v4
772
+ with :
773
+ name : Linux-AppImage-Build
774
+ - uses : actions/download-artifact@v4
775
+ with :
776
+ pattern : MacOSX-Build-*
777
+ merge-multiple : true
778
+ - uses : actions/download-artifact@v4
779
+ with :
780
+ pattern : Windows-Build-*
781
+ merge-multiple : true
782
+ - uses : actions/download-artifact@v4
783
+ with :
784
+ name : Sources
785
+ - name : Generate and upload sha256 file
786
+ id : upload-sha256-asset
787
+ run : |
788
+ # Clean up not published files from Debian-Build
789
+ rm -f *.buildinfo *.changes
790
+ sha256sum *$VERSION* > glpi-agent-$VERSION.sha256
791
+ gh release upload ${{ needs.setup-release.outputs.tag_name }} glpi-agent-$VERSION.sha256
792
+ shell : bash
793
+ env :
794
+ VERSION : ${{ needs.setup-release.outputs.version }}
795
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
759
796
- name : Publish release
760
797
id : publish-release
761
798
run : |
@@ -874,26 +911,34 @@ jobs:
874
911
;;
875
912
esac
876
913
# Get script to prepare page
914
+ cd glpi-agent
877
915
curl -L -s -o github-nightly-description.sh https://github.com/glpi-project/glpi-agent/raw/develop/tools/github-nightly-description.sh
878
916
chmod +x github-nightly-description.sh
917
+ sha256sum *${{ needs.setup-release.outputs.version }}* >sha256.txt
918
+ mv sha256.txt glpi-agent-${{ needs.setup-release.outputs.version }}.sha256
879
919
./github-nightly-description.sh --header --version ${{ needs.setup-release.outputs.version }} >index.md.new
880
920
git config --local user.email "${{ needs.setup-release.outputs.user-email }}"
881
921
git config --local user.name "${{ needs.setup-release.outputs.user-name }}"
882
- egrep '^# ' glpi-agent/ index.md | \
922
+ egrep '^# ' index.md | \
883
923
while read dash agent version x
884
924
do
885
925
VERSION="${version#v}"
886
926
if (( --COUNT > 0 )); then
887
927
echo "Keeping glpi-agent $VERSION build"
888
- read date time tz <<<$(git log -n1 --pretty=%ci -- glpi-agent/glpi-agent_${VERSION}_all.deb)
928
+ if [ ! -e glpi-agent-$VERSION.sha256 ]; then
929
+ sha256sum *$VERSION* >sha256.txt
930
+ mv sha256.txt glpi-agent-$VERSION.sha256
931
+ fi
932
+ read date time tz <<<$(git log -n1 --pretty=%ci -- glpi-agent_${VERSION}_all.deb)
889
933
./github-nightly-description.sh --version $VERSION --date "$date $time UTC" >>index.md.new
890
934
else
891
935
echo "Removing glpi-agent $VERSION build"
892
- git filter-branch --prune-empty -f --index-filter "git rm --cached --ignore-unmatch glpi-agent/ *$VERSION*" HEAD
936
+ git filter-branch --prune-empty -f --index-filter "git rm --cached --ignore-unmatch *$VERSION*" HEAD
893
937
fi
894
938
done
895
- mv -vf index.md.new glpi-agent/ index.md
939
+ mv -vf index.md.new index.md
896
940
rm -f github-nightly-description.sh
941
+ cd ..
897
942
echo "Repository status:"
898
943
git status
899
944
ls -lt glpi-agent
0 commit comments