Skip to content

Commit

Permalink
feat: aur ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ozwaldorf committed May 14, 2024
1 parent 598f317 commit 59da03d
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 29 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release Builds
on: workflow_dispatch

jobs:
release-windows:
name: Build Windows release
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
name: Checkout
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Build Binary
shell: powershell
run: |
& cargo build --locked --release
- name: Upload Files
uses: actions/upload-artifact@v4
with:
name: lutgen-x86_64-windows
path: target/release/lutgen.exe

release-aur:
name: Build AUR release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Build aur release
run: |
cargo install --git https://github.com/fosskers/cargo-aur --branch colin/custom-commands
cargo aur -o aur
- name: Upload Files
uses: actions/upload-artifact@v4
with:
name: lutgen-aur
path: aur
26 changes: 0 additions & 26 deletions .github/workflows/windows.yml

This file was deleted.

18 changes: 15 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ name = "lutgen"
path = "src/bin.rs"
required-features=["bin"]

[[bench]]
name = "main"
harness = false

[profile.release]
opt-level = 3
lto = true
Expand All @@ -54,6 +58,14 @@ panic = "abort"
[profile.test]
inherits = "release"

[[bench]]
name = "main"
harness = false
[package.metadata.aur]
custom = [
"# Generate and install shell completions",
"mkdir completions",
"./lutgen completions bash > completions/$_pkgname",
"./lutgen completions zsh > completions/_$_pkgname",
"./lutgen completions fish > completions/$_pkgname.fish",
"install -Dm644 completions/$_pkgname -t \"$pkgdir/usr/share/bash-completion/completions\"",
"install -Dm644 completions/_$_pkgname -t \"$pkgdir/usr/share/zsh/site-functions\"",
"install -Dm644 completions/$_pkgname.fish -t \"$pkgdir/usr/share/fish/vendor_completions.d\""
]

0 comments on commit 59da03d

Please sign in to comment.