From 044db5031b0ef95cef67b1ebc7512b807fdd41fe Mon Sep 17 00:00:00 2001 From: MexIT Date: Thu, 19 Dec 2024 21:52:03 +0100 Subject: [PATCH] minor: improve release --- .github/workflows/build_iso.yml | 46 +++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_iso.yml b/.github/workflows/build_iso.yml index 2b5dee9..be8c3ff 100644 --- a/.github/workflows/build_iso.yml +++ b/.github/workflows/build_iso.yml @@ -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