First Release
π Rust AUR Release Deploy
A powerful GitHub Action for building Rust applications, creating GitHub releases, and preparing packages for the Arch User Repository (AUR) deployment.
β¨ Features
- π¦ Build and package Rust applications with ease
- π― Cross-platform support for Linux and Windows builds
- π¦ Smart release handling - automatically uses existing releases or creates new ones
- ποΈ Prepare packages for AUR deployment automatically
- π Modular workflow design for flexible deployment options
- π οΈ Customizable build and packaging options for each platform
π Usage
Basic Example
name: Release and Deploy
on:
release:
types: [created]
workflow_dispatch:
inputs:
version:
description: 'Version to deploy (e.g. v1.0.0)'
required: false
rel:
description: 'Release number (e.g. 1)'
required: true
default: '1'
jobs:
release_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build and Prepare Release
id: release
uses: Da4ndo/rust-aur-release-deploy@v1
with:
pkg_name: your-package-name
version: ${{ github.event.inputs.version }} # If not provided, uses latest tag
rel: ${{ github.event.inputs.rel || '1' }}
build_linux: true
build_windows: true
linux_files: '["LICENSE", "config.toml"]'
windows_files: '["LICENSE", "config.win.toml"]'
release_files: '["README.md"]'
pkgbuild: './PKGBUILD'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to AUR
uses: KSXGitHub/github-actions-deploy-aur@v4.1.1
with:
pkgname: your-package-name
pkgbuild: ${{ steps.release.outputs.pkgbuild_path }}
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: "Update to version ${{ steps.release.outputs.version }}"
ssh_keyscan_types: rsa,ecdsa,ed25519π‘ Note: For more complex examples, check out the examples directory.
Release Handling
The action intelligently handles GitHub releases:
-
If a
versionis provided:- If a release with that version tag exists, it will upload assets to it
- If no release exists, it will create a new one
-
If no
versionis provided:- Uses the latest git tag as the version
- If no tags exist, the action will fail with a clear error message
- Follows the same logic as above for existing/new releases
This means you can:
- Create new releases with new versions
- Add additional assets to existing releases
- Use the latest tag automatically
All without any additional configuration!
π Inputs
| Name | Description | Required | Default |
|---|---|---|---|
version |
Version to deploy (e.g., v1.0.0). If not provided, uses the latest release tag. | No | Latest release tag |
pkg_name |
Name of your package | Yes | N/A |
build_linux |
Whether to build for Linux | No | true |
build_windows |
Whether to build for Windows | No | false |
linux_files |
List of additional files to include in the Linux tar.gz archive (JSON array) | No | '[]' |
windows_files |
List of additional files to include in the Windows release (JSON array) | No | '[]' |
release_files |
List of additional files to include in the GitHub release but not in platform archives (JSON array) | No | '[]' |
rel |
Release number for AUR package | No | '1' |
prepare_aur |
Whether to prepare PKGBUILD for AUR deployment | No | true |
pkgbuild |
Path to the PKGBUILD file to use for AUR deployment | No | '' |
pkgbuild_output_path |
Path where the prepared PKGBUILD file should be saved | No | './prepared_pkgbuild/PKGBUILD' |
π€ Outputs
| Name | Description |
|---|---|
version |
The version that was deployed |
linux_archive |
Path to the Linux tar.gz archive |
linux_sha256 |
SHA256 sum of the Linux archive |
windows_archive |
Path to the Windows zip archive |
windows_sha256 |
SHA256 sum of the Windows archive |
pkgbuild_path |
The path to the prepared PKGBUILD file |
π Environment Variables
| Name | Description |
|---|---|
GITHUB_TOKEN |
GitHub token for creating releases |
π Documentation
- PKGBUILD Guide - Learn how to create and customize your PKGBUILD file
- Changelog - View the version history and changes
- Contributing Guide - Learn how to contribute to this project
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[Released]
1.0.0 - 2025-03-05
Added
- Cross-platform build support for Linux and Windows
- Platform-specific file packaging with
linux_filesandwindows_files - Separate release files with
release_filesparameter - Automatic tar.gz archive creation for Linux builds
- Automatic zip archive creation for Windows builds
- SHA256 sum calculation for all archives
- Intelligent release handling (automatically uses existing release or creates new one)
- More flexible output paths with
pkgbuild_output_path - Improved error handling for missing git tags
- Enhanced emoji-based logging for better visibility
- Initial release of the Rust AUR Release Deploy GitHub Action
- Support for building Rust applications for multiple platforms
- Support for creating GitHub releases with compiled binaries
- Support for deploying packages to the Arch User Repository (AUR)
- Support for using existing PKGBUILD files
- Documentation and examples
Changed
- Split AUR deployment into separate step using KSXGitHub/github-actions-deploy-aur@v4.1.1
- Renamed
aurparameter toprepare_aurto better reflect its purpose - Changed file packaging to use platform-specific archives
- Improved error handling and logging with emojis
- Made the action more modular and flexible
- Simplified release handling logic (removed
create_releaseparameter) - Updated documentation and examples for new features
- Shortened parameter names for better usability:
additional_filesβfilesdeploy_to_aurβaurpkgbuild_pathβpkgbuild
- Changed
aurparameter to use boolean type instead of string - Modified
filesparameter to only accept JSON arrays
Removed
- Direct AUR deployment (now handled by KSXGitHub/github-actions-deploy-aur)
- aarch64 Linux build support (focusing on x86_64)
- Combined file list in favor of platform-specific lists
create_releaseparameter (now handled automatically)
π License
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by Da4ndo
β Star this repository if you find it useful! β