Skip to content

Commit

Permalink
do AUR stuff in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ifd3f committed Nov 11, 2023
1 parent 2c14587 commit fef10e5
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 12 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,47 @@ jobs:
with:
name: release
path: release

package-for-aur:
name: Make AUR packaging files
runs-on: ubuntu-latest
needs:
- ci-x86_64-linux
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: caligula-x86_64-linux

- name: Build docker image
uses: docker/build-push-action@v5
with:
push: false
tags: caligula-aur-packager:latest
context: packaging/aur/dockerenv

- name: Install dasel
run: |
sudo wget -qO /usr/local/bin/dasel https://github.com/TomWright/dasel/releases/latest/download/dasel_linux_amd64
sudo chmod a+x /usr/local/bin/dasel
- name: Generate files, build package, and test
run: |
version=$(dasel select 'package.version' -f Cargo.toml)
sha256=$(sha256sum testfile | awk '{print $1}')
docker run -v $(readlink -f ./out):/out caligula-packaging \
--sha256sum=$sha256 \
--pkgver=$version \
--pkgrel=1 \
/out
- uses: actions/upload-artifact@v3
with:
name: PKGBUILD
path: ./out/caligula-bin/PKGBUILD

- uses: actions/upload-artifact@v3
with:
name: .SRCINFO
path: ./out/caligula-bin/.SRCINFO
2 changes: 0 additions & 2 deletions packaging/aur/.gitignore

This file was deleted.

11 changes: 1 addition & 10 deletions packaging/aur/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
rootdir=$(shell pwd)

.PHONY: main
main: inputs dockerimage build caligula-bin
docker run --rm -it -v $(rootdir)/inputs:/inputs:ro -v $(rootdir)/caligula-bin:/caligula-bin caligula-packaging

.PHONY: dockerimage
dockerimage: dockerenv
docker build -t caligula-packaging $<

build:
mkdir -p build
docker build -t caligula-aur-packager $<

0 comments on commit fef10e5

Please sign in to comment.