minor: improve release

This commit is contained in:
MexIT 2024-12-19 21:52:03 +01:00
parent a6ce235cea
commit 044db5031b

View file

@ -1,5 +1,5 @@
env:
version: v3.21
version: 3.21
name: Alpine ISO Builder
@ -19,7 +19,7 @@ jobs:
apk upgrade
apk --no-cache add alpine-sdk build-base apk-tools alpine-conf \
busybox fakeroot syslinux xorriso squashfs-tools sudo mtools \
dosfstools grub-efi
dosfstools grub-efi github-cli
- uses: actions/checkout@v4
with:
@ -31,10 +31,10 @@ jobs:
- name: Configure build keys
run: echo | abuild-keygen -i -a
- name: Make ISO (${{ env.version }})
- name: Make ISO
run: |
chmod +x *.sh
mv *.sh aports/scripts/
cp *.sh aports/scripts/
cd aports/scripts/
./mkimage.sh \
@ -42,30 +42,36 @@ jobs:
--arch x86_64 \
--profile docker \
--outdir ../../ \
--repository https://dl-cdn.alpinelinux.org/alpine/${version}/main \
--repository https://dl-cdn.alpinelinux.org/alpine/${version}/community
--repository https://dl-cdn.alpinelinux.org/alpine/v${version}/main \
--repository https://dl-cdn.alpinelinux.org/alpine/v${version}/community
- name: Upload files
- name: Change ISO name
run: |
date=$(date +%y%m%d)
for file in *.iso; do
if [[ -f "$file" ]]; then
filename="$file"
ver=$(echo "$filename" | grep -oE '[0-9]+\.[0-9]+')
if [ -n "$ver" ]; then
new_filename=$(echo "$filename" | sed "s/$ver/$ver-$date/")
mv "$filename" "$new_filename"
fi
fi
done
- name: Upload ISO
if: ${{ ! startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v4
with:
name: files
path: .
include-hidden-files: true
release_ISOs:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-24.04
needs: build_ISOs
steps:
- name: Download files
uses: actions/download-artifact@v4
with:
name: files
name: alpine_${{ env.version }}_iso
path: ./*.iso
- name: Release AlpDock ISO
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
GH_TOKEN: ${{ github.token }}
run: |
git config --global --add safe.directory .
echo -e "Changelog\n---------" > changelog.txt
git log --reverse --pretty=format:"- %h: %s" $(git describe --tags --abbrev=0 HEAD^)..HEAD | egrep -v 'fix:|minor:|typo:' >> changelog.txt