feat: add release workflow, wherry-bin PKGBUILD, mold optdepends

This commit is contained in:
loki5512344 2026-07-14 14:09:47 +02:00
parent 88260d7ea2
commit c32c3a2e2d
Signed by: boba
GPG key ID: 253067914055423B
5 changed files with 82 additions and 3 deletions

View file

@ -3,6 +3,7 @@ name: Rust
on:
push:
branches: [ "main" ]
tags: [ "v*" ]
pull_request:
branches: [ "main" ]
@ -58,6 +59,10 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Build (release)
run: cargo build --release
- uses: actions/upload-artifact@v4
with:
name: wherry-x86_64
path: target/release/wherry
test:
runs-on: ubuntu-latest
@ -81,3 +86,25 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test
release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: [build, test]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: wherry-x86_64
- name: Package binary
run: |
mkdir -p pkg/usr/bin pkg/usr/share/licenses/wherry pkg/usr/share/pixmaps pkg/usr/share/applications
install -Dm755 wherry pkg/usr/bin/wherry
install -Dm644 LICENSE pkg/usr/share/licenses/wherry/LICENSE
install -Dm644 src/icons/128x128.png pkg/usr/share/pixmaps/wherry.png
install -Dm644 dist/wherry.desktop pkg/usr/share/applications/wherry.desktop
tar czf wherry-v${{ github.ref_name }}-x86_64-linux.tar.gz -C pkg .
- uses: softprops/action-gh-release@v2
with:
files: wherry-v${{ github.ref_name }}-x86_64-linux.tar.gz
generate_release_notes: true