summaryrefslogtreecommitdiffstatshomepage
path: root/.github
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-19 19:36:18 +0200
committerEgor Tensin <egor@tensin.name>2026-06-19 19:36:18 +0200
commit78ee3993b44fb78fc3037a403b1b22815b7cc159 (patch)
tree576109c1623b315ed755e25a7aaf784a09c08c8f /.github
parentworkflows: split out jobs from ci.yml into separate workflows (diff)
downloadcmake-common-78ee3993b44fb78fc3037a403b1b22815b7cc159.tar.gz
cmake-common-78ee3993b44fb78fc3037a403b1b22815b7cc159.zip
workflows: add a workflow to publish to AUR
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/aur.yml56
-rw-r--r--.github/workflows/ci.yml8
2 files changed, 63 insertions, 1 deletions
diff --git a/.github/workflows/aur.yml b/.github/workflows/aur.yml
new file mode 100644
index 0000000..bc25312
--- /dev/null
+++ b/.github/workflows/aur.yml
@@ -0,0 +1,56 @@
+name: Publish to AUR
+
+on:
+ workflow_call:
+ workflow_dispatch:
+
+jobs:
+ publish:
+ name: Publish to AUR
+ runs-on: ubuntu-latest
+ if: startsWith(github.ref, 'refs/tags/')
+ container:
+ image: archlinux:base-devel
+ steps:
+ # This step must be done before actions/checkout. From the latter's
+ # output:
+ #
+ # To create a local Git repository instead, add Git 2.18 or higher to the PATH
+ #
+ - name: Install dependencies
+ run: |
+ pacman -Syu --noconfirm git openssh
+
+ - name: Checkout
+ uses: actions/checkout@v6
+ with:
+ ref: aur
+ token: '${{ secrets.GH_TOKEN }}'
+
+ # makepkg for no reason hard-forbids running as root. Kill me now.
+ - name: Add builder user
+ run: |
+ useradd -m -s /bin/bash builder
+ chown -R builder:builder -- "$GITHUB_WORKSPACE"
+
+ - name: Configure SSH
+ run: |
+ mkdir -p /home/builder/.ssh/
+ cat > /home/builder/.ssh/config <<'EOF'
+ StrictHostKeyChecking no
+ EOF
+ cat > /home/builder/.ssh/id_ed25519 <<'EOF'
+ ${{ secrets.SSH_KEY }}
+ EOF
+ chown -R builder:builder /home/builder/.ssh
+ chmod 0600 /home/builder/.ssh/id_ed25519
+
+ - name: Configure git
+ run: |
+ # See https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
+ runuser -u builder -- git -C "$GITHUB_WORKSPACE" config user.name "github-actions[bot]"
+ runuser -u builder -- git -C "$GITHUB_WORKSPACE" config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+
+ - name: Run maintenance
+ run: |
+ runuser -u builder -- make -C "$GITHUB_WORKSPACE" maintenance
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1ce6e5f..830e67a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -37,10 +37,16 @@ jobs:
# Build a Python package and upload to PyPI.
publish:
- name: Publish
+ name: Publish to PyYPI
needs:
- lint
- basic
- boost_toolsets
- example_toolsets
uses: ./.github/workflows/publish.yml
+
+ aur:
+ name: Publish to AUR
+ needs:
+ - publish
+ uses: ./.github/workflows/aur.yml