@@ -22,27 +22,35 @@ jobs:
2222 artifact : playit-linux-amd64
2323 artifact_cli : playit-cli-linux-amd64
2424 dpkg_arch : amd64
25+ rpm_arch : x86_64
26+ aur_arch : x86_64
2527
2628 - name : linux arm64
2729 os : ubuntu-latest
2830 arch : aarch64-unknown-linux-musl
2931 artifact : playit-linux-aarch64
3032 artifact_cli : playit-cli-linux-aarch64
3133 dpkg_arch : arm64
34+ rpm_arch : aarch64
35+ aur_arch : aarch64
3236
3337 - name : linux arm7
3438 os : ubuntu-latest
3539 arch : armv7-unknown-linux-gnueabihf
3640 artifact : playit-linux-armv7
3741 artifact_cli : playit-cli-linux-armv7
3842 dpkg_arch : armhf
43+ rpm_arch : armv7hl
44+ aur_arch : armv7h
3945
4046 - name : linux 32bit
4147 os : ubuntu-latest
4248 arch : i686-unknown-linux-gnu
4349 artifact : playit-linux-i686
4450 artifact_cli : playit-cli-linux-i686
4551 dpkg_arch : i386
52+ rpm_arch : i686
53+ aur_arch : i686
4654
4755 runs-on : ${{ matrix.platform.os }}
4856 steps :
5462 env :
5563 GITHUB_TOKEN : ${{ github.token }}
5664
65+ - name : Install RPM packaging tools
66+ shell : bash
67+ run : |
68+ sudo apt-get update
69+ sudo apt-get install -y rpm
70+ sudo gem install --no-document fpm
71+
5772 - name : build release
5873 uses : actions-rs/cargo@v1
5974 with :
8196 asset_name : ${{ matrix.platform.artifact_cli }}
8297 asset_content_type : application/octet-stream
8398
99+ - name : Collect AUR inputs
100+ shell : bash
101+ run : |
102+ mkdir -p ./target/aur-inputs
103+ cp "./target/${{ matrix.platform.arch }}/release/playitd" "./target/aur-inputs/${{ matrix.platform.artifact }}"
104+ cp "./target/${{ matrix.platform.arch }}/release/playit-cli" "./target/aur-inputs/${{ matrix.platform.artifact_cli }}"
105+
106+ - name : Upload AUR inputs
107+ uses : actions/upload-artifact@v4
108+ with :
109+ name : linux-aur-inputs-${{ matrix.platform.aur_arch }}
110+ path : ./target/aur-inputs/*
111+
84112 - name : Package .deb
85113 shell : bash
86114 run : ' bash ./build-scripts/package-linux-deb.sh "./target/${{ matrix.platform.arch }}/release/playit-cli" "./target/${{ matrix.platform.arch }}/release/playitd" ${{ matrix.platform.dpkg_arch }}'
@@ -94,6 +122,57 @@ jobs:
94122 asset_path : ./target/deb/playit_${{ matrix.platform.dpkg_arch }}.deb
95123 asset_name : playit_${{ matrix.platform.dpkg_arch }}.deb
96124 asset_content_type : application/octet-stream
125+
126+ - name : Package .rpm
127+ shell : bash
128+ run : ' bash ./build-scripts/package-linux-rpm.sh "./target/${{ matrix.platform.arch }}/release/playit-cli" "./target/${{ matrix.platform.arch }}/release/playitd" ${{ matrix.platform.rpm_arch }}'
129+
130+ - name : Upload .rpm
131+ uses : actions/upload-release-asset@v1
132+ env :
133+ GITHUB_TOKEN : ${{ github.token }}
134+ with :
135+ upload_url : ${{ steps.get_release.outputs.upload_url }}
136+ asset_path : ./target/rpm/playit_${{ matrix.platform.rpm_arch }}.rpm
137+ asset_name : playit_${{ matrix.platform.rpm_arch }}.rpm
138+ asset_content_type : application/x-rpm
139+
140+ build_arch_aur :
141+ runs-on : ubuntu-latest
142+ needs : [build_linux]
143+ steps :
144+ - uses : actions/checkout@v3
145+
146+ - name : Get release
147+ id : get_release
148+ uses :
bruceadams/[email protected] 149+ env :
150+ GITHUB_TOKEN : ${{ github.token }}
151+
152+ - name : Download Linux release binaries
153+ uses : actions/download-artifact@v4
154+ with :
155+ pattern : linux-aur-inputs-*
156+ merge-multiple : true
157+ path : ./target/aur-inputs
158+
159+ - name : Generate AUR package files
160+ shell : bash
161+ run : |
162+ VERSION="${GITHUB_REF_NAME#v}"
163+ bash ./build-scripts/package-arch-aur.sh "${VERSION}" ./target/aur-inputs
164+ tar -C ./target/aur -czf ./target/playit-bin-PKGBUILD.tar.gz playit-bin
165+
166+ - name : Upload AUR package files
167+ uses : actions/upload-release-asset@v1
168+ env :
169+ GITHUB_TOKEN : ${{ github.token }}
170+ with :
171+ upload_url : ${{ steps.get_release.outputs.upload_url }}
172+ asset_path : ./target/playit-bin-PKGBUILD.tar.gz
173+ asset_name : playit-bin-PKGBUILD.tar.gz
174+ asset_content_type : application/gzip
175+
97176 build_windows :
98177 strategy :
99178 fail-fast : false
0 commit comments