Skip to content

Commit b391220

Browse files
committed
Fixes
1 parent c283eea commit b391220

2 files changed

Lines changed: 20 additions & 24 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,15 @@ jobs:
5454
- name: Build Debian package
5555
if: matrix.package_type == 'deb'
5656
run: |
57-
# Remove 'v' prefix from version for package
58-
VERSION=${GITHUB_REF_NAME#v}
59-
cargo deb --target ${{ matrix.target }} -- --deb-version=$VERSION
57+
cargo deb
6058
61-
- name: Install cargo-rpm (for Fedora packages)
59+
- name: Install cargo-generate-rpm (for Fedora packages)
6260
if: matrix.package_type == 'rpm'
63-
run: cargo install cargo-rpm
61+
run: cargo install cargo-generate-rpm
6462

6563
- name: Build RPM package
6664
if: matrix.package_type == 'rpm'
67-
run: |
68-
# Remove 'v' prefix from version for package
69-
VERSION=${GITHUB_REF_NAME#v}
70-
cargo rpm build --target ${{ matrix.target }} -- --version=$VERSION
65+
run: cargo generate-rpm
7166

7267
- name: Install cargo-aur (for Arch packages)
7368
if: matrix.package_type == 'arch'
@@ -76,30 +71,34 @@ jobs:
7671
- name: Build Arch package
7772
if: matrix.package_type == 'arch'
7873
run: |
79-
# Remove 'v' prefix from version for package
80-
VERSION=${GITHUB_REF_NAME#v}
81-
cargo aur --version=$VERSION
74+
cargo aur
8275
8376
- name: Upload Debian package
8477
if: matrix.package_type == 'deb'
8578
uses: actions/upload-artifact@v4
8679
with:
8780
name: apphatch-debian-${{ github.ref_name }}
88-
path: target/${{ matrix.target }}/debian/*.deb
81+
path: target//debian/*.deb
8982

9083
- name: Upload RPM package
9184
if: matrix.package_type == 'rpm'
9285
uses: actions/upload-artifact@v4
9386
with:
9487
name: apphatch-fedora-${{ github.ref_name }}
95-
path: target/${{ matrix.target }}/rpmbuild/RPMS/*/*.rpm
88+
path: target/release/generate-rpm/*.rpm
89+
90+
- name: Build Arch package
91+
if: matrix.package_type == 'arch'
92+
run: |
93+
cd target/cargo-aur
94+
makepkg
9695
9796
- name: Upload Arch package
9897
if: matrix.package_type == 'arch'
9998
uses: actions/upload-artifact@v4
10099
with:
101100
name: apphatch-arch-${{ github.ref_name }}
102-
path: target/${{ matrix.target }}/aur/*.pkg.tar.zst
101+
path: target/cargo-aur/*.pkg.tar.zst
103102

104103
release:
105104
needs: build
@@ -125,7 +124,7 @@ jobs:
125124
### Downloads
126125
- **Debian/Ubuntu**: `apphatch_${{ github.ref_name }}_amd64.deb`
127126
- **Fedora/RHEL**: `apphatch-${{ github.ref_name }}-1.x86_64.rpm`
128-
- **Arch Linux**: `apphatch-${{ github.ref_name }}-1-x86_64.pkg.tar.zst`
127+
- **Arch Linux**: `apphatch-bin-${{ github.ref_name }}-1-x86_64.pkg.tar.zst`
129128
130129
### Installation
131130
@@ -141,7 +140,7 @@ jobs:
141140
142141
**Arch Linux:**
143142
```bash
144-
sudo pacman -U apphatch-${{ github.ref_name }}-1-x86_64.pkg.tar.zst
143+
sudo pacman -U apphatch-bin-${{ github.ref_name }}-1-x86_64.pkg.tar.zst
145144
```
146145
files: |
147146
apphatch-debian-${{ github.ref_name }}/*.deb

Cargo.toml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ edition = "2024"
55
authors = ["CCXLV <mereba2627@gmail.com>"]
66
description = "AppHatch - Application management tool"
77
license = "MIT"
8-
repository = "https://github.com/yourusername/apphatch"
9-
homepage = "https://github.com/yourusername/apphatch"
8+
repository = "https://github.com/ccxlv/apphatch"
9+
homepage = "https://github.com/ccxlv/apphatch"
1010

1111
[dependencies]
1212
clap = { version = "4", features = ["derive"] }
@@ -24,12 +24,9 @@ assets = [
2424
["target/release/apphatch", "usr/bin/", "755"],
2525
]
2626

27-
[package.metadata.rpm]
28-
license = "MIT"
29-
group = "Development/Tools"
30-
requires = []
27+
[package.metadata.generate-rpm]
3128
assets = [
32-
["target/release/apphatch", "/usr/bin/apphatch", "755"],
29+
{ source = "target/release/apphatch", dest = "/usr/bin/apphatch" },
3330
]
3431

3532
[package.metadata.aur]

0 commit comments

Comments
 (0)