Update workflow

This commit is contained in:
jayofelony
2024-02-25 14:28:09 +01:00
parent 3fff6182ed
commit 391941e64a

View File

@ -25,7 +25,7 @@ jobs:
run: | run: |
COMMITS=$(git log --merges --pretty=format:"* %s" $LAST_VERSION..$VERSION | sed 's/$/\\n/g') COMMITS=$(git log --merges --pretty=format:"* %s" $LAST_VERSION..$VERSION | sed 's/$/\\n/g')
CONTRIBUTORS=$(git shortlog -sn $LAST_VERSION..$VERSION | awk '{print "* @" $2}' | sed 's/$/\\n/g') CONTRIBUTORS=$(git shortlog -sn $LAST_VERSION..$VERSION | awk '{print "* @" $2}' | sed 's/$/\\n/g')
RELEASE_BODY="## What's Changed\n$COMMITS\n\n## New Contributors\n$CONTRIBUTORS\n\n**Full Changelog**: https://github.com/jayofelony/pwnagotchi-torch/compare/$LAST_VERSION...$VERSION" RELEASE_BODY="## What's Changed\n$COMMITS\n\n## New Contributors\n$CONTRIBUTORS\n\n**Full Changelog**: https://github.com/jayofelony/pwnagotchi/compare/$LAST_VERSION...$VERSION"
echo "RELEASE_BODY=$RELEASE_BODY" >> $GITHUB_ENV echo "RELEASE_BODY=$RELEASE_BODY" >> $GITHUB_ENV
- name: Install qemu dependencies - name: Install qemu dependencies
@ -34,14 +34,23 @@ jobs:
- name: Build img file - name: Build img file
run: ls -la .; pwd; make all run: ls -la .; pwd; make all
- name: Transfer .img to docker and give permissions - name: Transfer 32bit.img to docker and give permissions
run: sudo chown runner:docker "pwnagotchi-rpi-bullseye-armhf.img" run: sudo chown runner:docker "pwnagotchi-32bit.img"
- name: Compress .img file to an .img.xz - name: Transfer 64bit.img to docker and give permissions
run: ls -la .; pwd; xz -z "pwnagotchi-rpi-bullseye-armhf.img" run: sudo chown runner:docker "pwnagotchi-64bit.img"
- name: Change name of .img.xz to add version - name: Compress 32bit.img file to an .img.xz
run: mv "pwnagotchi-rpi-bullseye-armhf.img.xz" "pwnagotchi-rpi-bullseye-$VERSION-armhf.img.xz" run: ls -la .; pwd; xz -z "pwnagotchi-32bit.img"
- name: Compress 64bit.img file to an .img.xz
run: ls -la .; pwd; xz -z "pwnagotchi-64bit.img"
- name: Change name of 32.img.xz to add version
run: mv "pwnagotchi-32bit.img.xz" "pwnagotchi-$VERSION-32bit.img.xz"
- name: Change name of 64.img.xz to add version
run: mv "pwnagotchi-64bit.img.xz" "pwnagotchi-$VERSION-64bit.img.xz"
- name: Release - name: Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
@ -49,5 +58,5 @@ jobs:
tag_name: ${{ env.VERSION }} tag_name: ${{ env.VERSION }}
name: Pwnagotchi v${{ env.VERSION }} name: Pwnagotchi v${{ env.VERSION }}
token: ${{ secrets.TOKEN }} token: ${{ secrets.TOKEN }}
files: pwnagotchi-rpi-bullseye-${{ env.VERSION }}-armhf.img.xz files: pwnagotchi-${{ env.VERSION }}-32bit.img.xz, pwnagotchi-${{ env.VERSION }}-64bit.img.xz
body: ${{ env.RELEASE_BODY }} body: ${{ env.RELEASE_BODY }}