MultiOS-USB.version: 0.7.0 -> 0.8.0 #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build_image: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Upgrade packages and install required software | |
run: | | |
sudo apt update | |
sudo apt -y upgrade | |
sudo apt -y install qemu-utils grub-pc | |
- name: Set version | |
run: echo "ver=$(git describe --tags --exact-match)" >> "$GITHUB_ENV" | |
- name: Linux Release | |
run: git archive --prefix=MultiOS-USB_$ver/ -o MultiOS-USB_linux_$ver.tar.gz $ver | |
- name: Windows Release | |
run: | | |
image_name="image.img" | |
image_size="54542848" | |
qemu-img create -f raw $image_name $image_size | |
dev=$(sudo losetup -f -P --show $image_name) | |
sed -i 's|^part_data="${tmpdir}/part_data"|part_data="part_data"|g' multios-usb.sh | |
sed -i -e '262s/^/# /; 265s/^/# /; 275s/^/# /; 295s/^/# /; 320,321s/^/# /' multios-usb.sh | |
echo "YeS" | sudo ./multios-usb.sh $dev | |
sudo losetup -d $dev | |
(cd part_data && sudo zip -r ../files.zip *) | |
mv docs/README_image README | |
sudo zip MultiOS-USB_windows_image_$ver.zip $image_name files.zip README | |
- name: Generate SHA256SUM | |
run: sha256sum MultiOS-USB_windows_image_*.zip MultiOS-USB_linux_*.tar.gz > sha256sums.txt | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: | | |
MultiOS-USB_windows_image_*.zip | |
MultiOS-USB_linux_*.tar.gz | |
sha256sums.txt |