Skip to content

Commit 59bd0d5

Browse files
committed
ci: add arch linux packaging job
1 parent 2582a90 commit 59bd0d5

File tree

4 files changed

+55
-2
lines changed

4 files changed

+55
-2
lines changed

.github/workflows/release.yml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
linux:
2626
name: linux / ${{ matrix.target }}
2727
runs-on: ubuntu-latest
28-
# needs: github
28+
needs: github
2929
strategy:
3030
fail-fast: false
3131
matrix:
@@ -206,7 +206,7 @@ jobs:
206206
id: get_tags
207207
run: |
208208
for tag in $(git tag --points-at HEAD); do
209-
echo "${tag%-*}=${tag##*-}" >> "$GITHUB_OUTPUT"
209+
echo "${tag%-*}=${tag##*-}" >>"$GITHUB_OUTPUT"
210210
done
211211
212212
- uses: docker/build-push-action@v5
@@ -231,3 +231,48 @@ jobs:
231231
password: ${{ secrets.DOCKERHUB_TOKEN }}
232232
repository: fossable/goldboot
233233

234+
archlinux:
235+
name: archlinux / ${{ matrix.package }}
236+
runs-on: ubuntu-latest
237+
needs: github
238+
strategy:
239+
matrix:
240+
package:
241+
- goldboot
242+
- goldboot-registry
243+
steps:
244+
- uses: actions/checkout@v4
245+
with:
246+
submodules: true
247+
fetch-tags: true
248+
249+
- name: Find version tags
250+
id: get_tags
251+
run: |
252+
for tag in $(git tag --points-at HEAD); do
253+
if [ "${tag%-*}" = "${{ matrix.package }}" ]; then
254+
echo "pkgver=${tag##*-}" >>"$GITHUB_OUTPUT"
255+
fi
256+
done
257+
258+
- uses: heyhusen/archlinux-package-action@v2
259+
with:
260+
path: dist/pacman/${{ matrix.package }}
261+
srcinfo: true
262+
pkgver: ${{ steps.get_tags.outputs.pkgver }}
263+
264+
- name: Push release to AUR
265+
env:
266+
AUR_PRIVATE_KEY: ${{ secrets.AUR_PRIVATE_KEY }}
267+
run: |
268+
echo "${AUR_PRIVATE_KEY}" >/tmp/id_rsa
269+
chmod 600 /tmp/id_rsa
270+
cd dist/pacman/${{ matrix.package }}
271+
272+
git config --global user.name "github-actions"
273+
git config --global user.email "[email protected]"
274+
ssh-keyscan -H aur.archlinux.org >/tmp/known_hosts
275+
276+
git add .SRCINFO PKGBUILD
277+
git commit -m "release: ${{ steps.get_tags.outputs.pkgver }}"
278+
GIT_SSH_COMMAND='ssh -i /tmp/id_rsa -o UserKnownHostsFile=/tmp/known_hosts' git push -u origin master

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "dist/pacman/goldboot"]
2+
path = dist/pacman/goldboot
3+
url = ssh://[email protected]/goldboot
4+
[submodule "dist/pacman/goldboot-registry"]
5+
path = dist/pacman/goldboot-registry
6+
url = ssh://[email protected]/goldboot-registry

dist/pacman/goldboot

Submodule goldboot added at 091712a

dist/pacman/goldboot-registry

Submodule goldboot-registry added at 705a6b7

0 commit comments

Comments
 (0)