Skip to content

Commit

Permalink
refactor: remove pacman package
Browse files Browse the repository at this point in the history
  • Loading branch information
decipher3114 committed Oct 24, 2024
1 parent 5e03d91 commit 2dcf214
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 39 deletions.
33 changes: 2 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ jobs:
name: linux_packages
path: |
target/packages/*.deb
target/packages/*.tar.gz
target/packages/PKGBUILD
- name: Upload macos artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -110,34 +108,7 @@ jobs:
${{ steps.changelog.outputs.changes }}
files: |
windows_packages/*
linux_packages/capter*
linux_packages/*
macos_packages/*
draft: false
prerelease: false

- name: AUR SSH Keys
run: |
mkdir -p ~/.ssh
echo "${{ secrets.AUR_SSH_PRIVATE_KEY }}" > ~/.ssh/aur
chmod 600 ~/.ssh/aur
echo -e "Host aur.archlinux.org\n IdentityFile ~/.ssh/aur\n User aur\n StrictHostKeyChecking=no" > ~/.ssh/config
- name: Generate .SRCINFO
uses: heyhusen/archlinux-package-action@v2
with:
path: linux_packages
flags: ''
namcap: false
srcinfo: true

- name: Update AUR
run: |
git clone ssh://aur@aur.archlinux.org/capter.git capter-aur
cp -fv linux_packages/PKGBUILD capter-aur/
cp -fv linux_packages/.SRCINFO capter-aur/
cd capter-aur
git add PKGBUILD .SRCINFO
git config --global user.name "${{ secrets.AUR_USERNAME }}"
git config --global user.email "${{ secrets.AUR_EMAIL }}"
git commit -m "Update: ${{ github.ref_name }}" || echo "No changes !!"
git push --force
prerelease: false
40 changes: 40 additions & 0 deletions .github/workflows/update_aur.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Update AUR

on:
workflow_run:
workflows: ['Release']
types:
- completed

jobs:
run_on_release_success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Setup git auth
run: |
mkdir -p ~/.ssh
echo "${{ secrets.AUR_SSH_PRIVATE_KEY }}" > ~/.ssh/aur
chmod 600 ~/.ssh/aur
echo -e "Host aur.archlinux.org\n IdentityFile ~/.ssh/aur\n User aur\n StrictHostKeyChecking=no" > ~/.ssh/config
git config --global user.name "${{ secrets.AUR_USERNAME }}"
git config --global user.email "${{ secrets.AUR_EMAIL }}"
- name: Clone AUR
run: |
git clone ssh://aur@aur.archlinux.org/capter.git
- name: Update AUR
uses: heyhusen/archlinux-package-action@v2
with:
path: capter
flags: '--nodeps --nobuild'
namcap: false
srcinfo: true

- name: Push Update
run: |
cd capter
git add PKGBUILD .SRCINFO
git commit -m "Update: ${{ github.ref_name }}" || echo "No changes !!"
git push --force
8 changes: 2 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ authors = ["decipher3114 <decipher3114@gmail.com>"]
publisher = "decipher3114"
category = "Utility"
copyright = "Copyright © 2024"
formats = ["wix", "deb", "pacman", "dmg"]
formats = ["wix", "deb", "dmg"]
before-packaging-command = "cargo build --release"
icons = ["assets/icons/windows/icon.ico", "assets/icons/macos/icon.icns", "assets/icons/linux/*"]
icons = ["assets/resources/windows/icon.ico", "assets/resources/macos/icon.icns", "assets/resources/linux/hicolor/*/apps/capter.png"]
out-dir = "target/packages"

[package.metadata.packager.wix]
Expand All @@ -61,7 +61,3 @@ minimum-system-version = "10.13"

[package.metadata.packager.deb]
depends = ["libgtk-3-dev", "libxdo-dev", "libayatana-appindicator3-dev", "libxcb1", "libxrandr2", "libdbus-1-3"]

[package.metadata.packager.pacman]
source = ["${pkgname}-${pkgver}.tar.gz::https://github.com/decipher3114/Capter/releases/latest/download/Capter_${pkgver}_x86_64.tar.gz"]
depends = ["gtk3", "xdotool", "libayatana-appindicator", "libxcb", "libxrandr", "dbus"]
Binary file removed assets/icons/linux/128@2x.png
Binary file not shown.
Binary file removed assets/icons/linux/256@2x.png
Binary file not shown.
Binary file removed assets/icons/linux/32@2x.png
Binary file not shown.
Binary file removed assets/icons/linux/48@2x.png
Binary file not shown.
File renamed without changes
8 changes: 8 additions & 0 deletions assets/resources/linux/capter.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Name=Capter
Comment=A simple cross-platform screenshot tool
Exec=capter
Icon=capter
Terminal=false
Type=Application
Categories=Utility
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fn main() {
#[cfg(target_os = "windows")]
{
let mut res = winresource::WindowsResource::new();
res.set_icon("assets/icons/windows/icon.ico");
res.set_icon("assets/resources/windows/icon.ico");
res.compile().unwrap();
}
}
2 changes: 1 addition & 1 deletion src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub const FONT_BOLD: &[u8] = include_bytes!("../assets/fonts/SpaceGrotesk-Bold.t

pub const FONT_ICONS: &[u8] = include_bytes!("../assets/fonts/icons.ttf");

pub const APPICON: &[u8] = include_bytes!("../assets/icons/icon.png");
pub const APPICON: &[u8] = include_bytes!("../assets/resources/icon.png");

use iced::Font;

Expand Down

0 comments on commit 2dcf214

Please sign in to comment.