Skip to content

Feature: Automate AUR release - #3910

Merged
infeo merged 9 commits into
developfrom
feature/automate-aur
Jun 26, 2025
Merged

infeo merged 9 commits into
developfrom
feature/automate-aur

Conversation

@infeo

@infeo infeo commented Jun 25, 2025

Copy link
Copy Markdown
Member

This PR adds a new workflow to the repository: AUR release automation

The workflow is started by a published release or manually. In the latter case the release tag must be specified. It works similarly to the flathub release workflow:

  1. Create a branch in the AUR repo
  2. Update the PKGBUILD file with release archive url and checksum
  3. Generate the .SRCINFO file
  4. Push changes
  5. Create PR
  6. Notify about the PR

@infeo infeo self-assigned this Jun 25, 2025
@coderabbitai

coderabbitai Bot commented Jun 25, 2025 •

Copy link
Copy Markdown

Walkthrough

The workflows were updated to enhance AUR package update automation. In the AUR workflow, the job name capitalization was standardized, apt sources were updated before installing both makepkg and pacman-package-manager, and sed commands were revised to set the package version, reset the release number, and update SHA256 sums with refined regex and quoting. A git stage . command was added before committing changes. Slack notification steps were corrected by replacing commented-out conditionals with proper if: conditions and updating message titles. The AppImage workflow introduced a new job triggered on release events that depends on build completion, downloads AppImage artifacts, computes SHA256 checksums for x86_64 and aarch64, checks out the AUR bin repository, updates PKGBUILD and .SRCINFO, commits and pushes changes, creates a pull request with a checklist, and sends Slack notifications.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b7dbfe1 and b1fa885.

📒 Files selected for processing (1)
  • .github/workflows/appimage.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/appimage.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
.github/workflows/aur.yml (1)

69-70: git stage is an alias – use the canonical git add for portability
Although recent Git versions ship stage as an alias, older ones (and minimal containers) don’t. Using the primary command avoids surprises.

-          git stage .
+          git add .
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e57e535 and 580b42c.

📒 Files selected for processing (1)
  • .github/workflows/aur.yml (3 hunks)

Comment thread .github/workflows/aur.yml Resolved
Comment thread .github/workflows/aur.yml Resolved
Comment thread .github/workflows/aur.yml Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
.github/workflows/appimage.yml (1)

181-192: Duplicated hashing code – move to a single reusable step

The two hash steps are identical except for the matrix guard. This duplication is brittle and clutters the workflow.

-      - name: Compute sha256 hash
-        id: checksum
-        run: |
-          APPIMAGE_SHA256=$(sha256sum cryptomator-*.AppImage | cut -d ' ' -f1)
-          echo "sha256sum=${APPIMAGE_SHA256}" >> "$GITHUB_OUTPUT"
+      - name: Compute sha256 hash
+        id: checksum
+        run: |
+          APPIMAGE_SHA256=$(sha256sum cryptomator-*.AppImage | cut -d ' ' -f1)
+          echo "sha256sum=${APPIMAGE_SHA256}" >> "$GITHUB_OUTPUT"
+        env:
+          ARCH: ${{ matrix.appimage-suffix }}
+
+    outputs:
+      sha256-${{ matrix.appimage-suffix }}: ${{ steps.checksum.outputs.sha256sum }}

This keeps a single source of truth and plays nicer with refactors.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 97ac36d and 137b4ba.

📒 Files selected for processing (1)
  • .github/workflows/appimage.yml (3 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/appimage.yml

227-227: property "get-version" is not defined in object type {build: {outputs: {aarch64-sha256: string; x64-sha256: string}; result: string}}

(expression)


230-230: property "get-version" is not defined in object type {build: {outputs: {aarch64-sha256: string; x64-sha256: string}; result: string}}

(expression)


237-237: property "get-version" is not defined in object type {build: {outputs: {aarch64-sha256: string; x64-sha256: string}; result: string}}

(expression)


245-245: property "get-version" is not defined in object type {build: {outputs: {aarch64-sha256: string; x64-sha256: string}; result: string}}

(expression)


267-267: input "artifact-ids" is not defined in action "actions/download-artifact@v4". available inputs are "github-token", "merge-multiple", "name", "path", "pattern", "repository", "run-id"

(action)


267-267: object, array, and null values should not be evaluated in template with ${{ }} but evaluating the value of type {aarch64-sha256: string; x64-sha256: string}

(expression)

🪛 YAMLlint (1.37.1)
.github/workflows/appimage.yml

[error] 267-267: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Create PR for aur-bin repo
🔇 Additional comments (1)
.github/workflows/appimage.yml (1)

223-226: Package installation likely fails on Ubuntu runners

makepkg is supplied by the Arch pacman package itself; Debian/Ubuntu split does not provide a makepkg package, and pacman-package-manager alone doesn’t ship it.
Either switch to an archlinux container or install pacman from the AUR build of pacman-bin.

Failure mode: makepkg: command not found → .SRCINFO generation step breaks.

Comment thread .github/workflows/appimage.yml Resolved
Comment thread .github/workflows/appimage.yml Resolved
Comment thread .github/workflows/appimage.yml Resolved
Comment thread .github/workflows/appimage.yml Resolved
* make sed commands more robust
* apply workaround for matrix outputs overwriting each other

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
.github/workflows/appimage.yml (3)

202-206: Consider narrowing the artifact download to prevent accidental hash collisions

actions/download-artifact without name pulls all artifacts from the run.
If any future job uploads an additional *.AppImage, the checksum step will
pick up multiple files and produce ambiguous output.

with:
  name: appimage-*
  path: downloads/
  merge-multiple: true

Or keep the current setting but filter explicitly with head -n1 when
computing the hashes.


208-213: Hash extraction not resilient to multiple matches

sha256sum downloads/cryptomator-*-x86_64.AppImage | cut -d' ' -f1 returns
all hashes concatenated with line-breaks if more than one file matches,
propagating a malformed value to PKGBUILD.
Append | head -n1 (or filter the glob) to guarantee exactly one hash.


259-259: Missing trailing newline

YAMLlint flags the lack of a final EOL. Add one to satisfy linters and keep
diffs clean.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 137b4ba and b7dbfe1.

📒 Files selected for processing (2)
  • .github/workflows/appimage.yml (1 hunks)
  • .github/workflows/aur.yml (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/aur.yml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: infeo
PR: cryptomator/cryptomator#3910
File: .github/workflows/aur.yml:54-55
Timestamp: 2025-06-25T15:40:07.452Z
Learning: In Ubuntu repositories, the pacman package manager is available as `pacman-package-manager`, not just `pacman`. When installing pacman tools on Ubuntu for AUR workflows, use `sudo apt install makepkg pacman-package-manager`.
.github/workflows/appimage.yml (9)
Learnt from: infeo
PR: cryptomator/cryptomator#3641
File: .github/workflows/win-exe.yml:19-19
Timestamp: 2024-12-10T17:06:19.650Z
Learning: In the Cryptomator project, the exact JDK version is fixed in release workflows (e.g., `.github/workflows/win-exe.yml`, `.github/workflows/mac-dmg.yml`) to ensure reproducible builds.
Learnt from: infeo
PR: cryptomator/cryptomator#3267
File: src/main/java/org/cryptomator/ui/vaultoptions/VaultOptionsController.java:54-56
Timestamp: 2024-07-27T13:14:40.963Z
Learning: The user `infeo` has clarified that in the Cryptomator project, it is intentional for the vault options to be disabled when the vault is unlocked and not disabled when the vault is locked. This is a specific design decision for the `VaultOptionsController.java` within the context of PR 3267.
Learnt from: purejava
PR: cryptomator/cryptomator#3311
File: src/main/java/org/cryptomator/ui/vaultoptions/MasterkeyOptionsController.java:0-0
Timestamp: 2024-11-24T16:47:01.698Z
Learning: In Cryptomator, avoid adding unnecessary complexity to error handling in UI controllers unless it's critical.
Learnt from: gepbird
PR: cryptomator/cryptomator#3621
File: src/main/java/org/cryptomator/ui/keyloading/hub/HubConfig.java:55-58
Timestamp: 2024-11-19T23:01:51.307Z
Learning: In the Cryptomator project, updating `LegacyRegisterDeviceController` is not necessary when changing URI construction methods.
Learnt from: infeo
PR: cryptomator/cryptomator#3618
File: src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java:151-165
Timestamp: 2024-11-21T16:57:58.292Z
Learning: In the file `src/main/java/org/cryptomator/ui/fxapp/FxApplicationWindows.java`, when reviewing the method `showDokanySupportEndWindow`, suggestions to add error handling to asynchronous dialog creation (e.g., `CompletableFuture`) may be considered out of scope for certain pull requests.
Learnt from: infeo
PR: cryptomator/cryptomator#3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:27-45
Timestamp: 2024-12-11T13:52:42.201Z
Learning: In the Cryptomator project, parameter validation is performed in the `SimpleDialog` builder, so it's unnecessary to duplicate validation in controller classes like `SimpleDialogController`.
Learnt from: infeo
PR: cryptomator/cryptomator#3780
File: src/main/java/org/cryptomator/ui/eventview/EventListCellController.java:113-128
Timestamp: 2025-03-21T15:58:30.027Z
Learning: In Cryptomator's event system, entries are removed directly from the model (FileSystemEventAggregator) and then automatically synced to the view (FxFSEventList) with a potential delay of up to one second. This follows a model-view pattern where verification of removal is handled by the synchronization mechanism rather than explicit logging.
Learnt from: overheadhunter
PR: cryptomator/cryptomator#3641
File: .github/workflows/win-exe.yml:20-21
Timestamp: 2024-12-11T08:28:24.864Z
Learning: In the Cryptomator project, it's acceptable to update the JDK version (e.g., to JDK 23) while keeping the JavaFX version at an older version (e.g., JavaFX 22.0.2), as this has not caused problems in the past.
Learnt from: infeo
PR: cryptomator/cryptomator#3618
File: src/main/java/org/cryptomator/ui/dialogs/SimpleDialogController.java:55-67
Timestamp: 2024-12-11T13:52:43.966Z
Learning: In the `SimpleDialogController` class of the Cryptomator application, the actions passed to the `handleOk()` and `handleCancel()` methods are responsible for their own error handling. Therefore, wrapping these actions with try-catch blocks in the controller is unnecessary.
🪛 YAMLlint (1.37.1)
.github/workflows/appimage.yml

[error] 259-259: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Create PR for aur-bin repo

Comment thread .github/workflows/appimage.yml Resolved
Comment thread .github/workflows/appimage.yml Resolved
Comment thread .github/workflows/appimage.yml Resolved
Comment thread .github/workflows/appimage.yml Resolved
@infeo

infeo commented Jun 26, 2025

Copy link
Copy Markdown
Member Author

@overheadhunter I'll adjust the secret name of the auth token in a seperate commit, since it affects also other workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants