forked from jayofelony/pwnagotchi
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.73 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Publish
on:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.name }}
runs-on: buildjet-2vcpu-ubuntu-2204
strategy:
matrix:
include:
# - name: "Raspberry Pi 32-bit"
# id: "32bit"
# - name: "Raspberry Pi 64-bit"
# id: "64bit"
- name: "Banana Pi M4 zero"
id: "bpim4"
steps:
- uses: actions/checkout@v4
with:
path: publish/build
- name: Extract version from file
id: get_version
run: |
VERSION=$(cut -d "'" -f2 < publish/build/pwnagotchi/_version.py)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Install qemu dependencies
run: sudo apt update && sudo apt install qemu-user-static qemu-utils xz-utils -y
- name: Build ${{ matrix.name }} img file
run: cd publish/build; ls -la .; pwd; make packer; make ${{ matrix.id }}
- name: Change name of .img.xz to add version
run: |
sudo chown runner:docker "pwnagotchi-${{ matrix.id }}.img"
mv "pwnagotchi-${{ matrix.id }}.img" "pwnagotchi-${{ env.VERSION }}-${{ matrix.id }}.img"
- name: PiShrink
run: |
wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh
chmod +x pishrink.sh
sudo mv pishrink.sh /usr/local/bin
sudo pishrink.sh -aZ "pwnagotchi-${{ env.VERSION }}-${{ matrix.id }}.img"
- name: Release
uses: softprops/action-gh-release@v2
with:
prerelease: false
make_latest: true
tag_name: v${{ env.VERSION }}
name: Pwnagotchi v${{ env.VERSION }}
files: pwnagotchi-${{ env.VERSION }}-${{ matrix.id }}.img.xz
generate_release_notes: true