Skip to content

Commit 42d131c

Browse files
committed
Improve release text and add checksums
1 parent d3efccb commit 42d131c

File tree

2 files changed

+30
-34
lines changed

2 files changed

+30
-34
lines changed

.github/workflows/blank.yml

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,23 @@ jobs:
1919

2020
- name: build
2121
run: |
22-
sudo apt install util-linux squashfs-tools curl mkisofs util-linux xorriso xz-utils
22+
sudo apt install util-linux squashfs-tools curl mkisofs xorriso xz-utils
2323
sudo ./build.sh clonezilla.iso clonezilla_with_virtualbox.iso
24-
25-
- name: Create Release
26-
id: create_release
27-
uses: actions/create-release@v1
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
with:
31-
tag_name: ${{ github.ref }}
32-
release_name: Release ${{ github.ref }}
33-
body:
34-
The release was automatically created by the Git Actions workflow corresponding to directory .github in the repository.
35-
The input of this release is the CloneZilla release liked to in the Readme.
36-
37-
**Technical note**
38-
The split parameter for archive saved (ocs-sr -i...) has been set to 4096 (MB), so that it exactly matches the new value set for xorriso split_size and there is no risk of a differing split limits (an issue was once noticed experimentally with split_limit set at 2017 for xorriso and an xz archive slightly bigger that 2GB).
39-
40-
**Checksums**
41-
md5sum $(md5sum ./clonezilla_with_virtualbox.iso)
42-
sha1sum $(sha1sum ./clonezilla_with_virtualbox.iso)
43-
sha256sum $(sha256sum ./clonezilla_with_virtualbox.iso)
44-
45-
draft: false
46-
prerelease: false
47-
48-
- name: Upload Release Asset
49-
id: upload-release-asset
50-
uses: actions/upload-release-asset@v1
24+
25+
- name: Upload Release Assets
26+
run: |
27+
set -x
28+
assets=()
29+
for asset in "./clonezilla_with_virtualbox.iso" "./checksums.txt"; do
30+
assets+=("-a" "$asset")
31+
done
32+
tag_name="${GITHUB_REF##*/}"
33+
hub release create "${assets[@]}" \
34+
-m "Release $tag_name" \
35+
-m "This release was automatically created by the Git Actions workflow corresponding to directory .github in the repository." \
36+
-m "The input of this release is the CloneZilla release linked to in the Readme." "$tag_name"
5137
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
with:
54-
upload_url: ${{ steps.create_release.outputs.upload_url }}
55-
asset_path: ./clonezilla_with_virtualbox.iso
56-
asset_name: clonezilla_with_virtualbox.iso
57-
asset_content_type: application/octet-stream
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
40+
41+

build.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,18 @@ EOF
150150
umount -R -l mnt2
151151
rm -rf mnt2
152152
rm -rf ISOFILES
153+
154+
if [ -f "${CLONEZILLACD}" ]
155+
then
156+
echo "[MSG] Workflow created file ${CLONEZILLACD}."
157+
echo " with following checksums:"
158+
echo " md5sum: $(md5sum ${CLONEZILLACD})" | tee checksums.txt
159+
echo " sha1sum: $(sha1sum ${CLONEZILLACD})" | tee -a checksums.txt
160+
echo " sha256sum: $(sha256sum ${CLONEZILLACD})" | tee -a checksums.txt
161+
else
162+
echo "[ERR] Workflow failed to create file ${CLONEZILLACD}."
163+
fi
164+
153165
}
154166

155167
bind_mount_clonezilla_iso() {

0 commit comments

Comments
 (0)