Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 62 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
git archive --format=tar.gz -o tiny4linux-${VERSION}.tar.gz HEAD
git archive --format=zip -o tiny4linux-${VERSION}.zip HEAD

- name: Update PKGBUILD & SRCINFO with new version and SHA
- name: Update PKGBUILD & SRCINFO for the GUI with new version and SHA
run: |
VERSION=${{ github.event.inputs.version }}
sha=$(sha256sum tiny4linux-${VERSION}.tar.gz | cut -d' ' -f1)
Expand All @@ -96,6 +96,28 @@ jobs:
su - builder -c 'cd /pkg && makepkg --printsrcinfo > .SRCINFO'
"

- name: Update PKGBUILD & SRCINFO for the CLI with new version and SHA
run: |
VERSION=${{ github.event.inputs.version }}
sha=$(sha256sum tiny4linux-${VERSION}.tar.gz | cut -d' ' -f1)

cd deployment/cli/aur

sed -i "s/^pkgver=.*/pkgver=${VERSION}/" PKGBUILD
sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD
sed -i "s/^sha256sums=.*/sha256sums=('${sha}')/" PKGBUILD

# Write-Permissions for Container-User
chmod -R 777 .

docker run --rm -v $PWD:/pkg archlinux:latest bash -c "
pacman -Sy --noconfirm --needed base-devel shadow &&
useradd -m builder || true &&
chown -R builder:builder /pkg &&
cd /pkg &&
su - builder -c 'cd /pkg && makepkg --printsrcinfo > .SRCINFO'
"

- name: Upload tarballs and metadata
uses: actions/upload-artifact@v4
with:
Expand All @@ -107,6 +129,9 @@ jobs:
deployment/gui/aur/PKGBUILD
deployment/gui/aur/.SRCINFO
deployment/gui/aur/LICENSE
deployment/cli/aur/PKGBUILD
deployment/cli/aur/.SRCINFO
deployment/cli/aur/LICENSE
retention-days: 1

add-version-commit:
Expand Down Expand Up @@ -160,11 +185,12 @@ jobs:
tag_name: v${{ github.event.inputs.version }}
files: |
target/release/tiny4linux-gui
target/release/tiny4linux-cli
tiny4linux-${{ github.event.inputs.version }}.tar.gz
tiny4linux-${{ github.event.inputs.version }}.zip

deploy-aur:
name: 'Deployment to AUR'
deploy-aur-gui:
name: 'Deploy GUI to AUR'
runs-on: ubuntu-latest
needs: [create-github-release]
steps:
Expand Down Expand Up @@ -195,10 +221,42 @@ jobs:
git commit -m "Update to Version ${{ github.event.inputs.version }}"
git push

deploy-aur-cli:
name: 'Deploy CLI to AUR'
runs-on: ubuntu-latest
needs: [create-github-release]
steps:
- name: Setup SSH for AUR
run: |
mkdir -p ~/.ssh
echo "${{ secrets.AUR_SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan aur.archlinux.org >> ~/.ssh/known_hosts

- name: Clone AUR repository
run: |
git clone ssh://[email protected]/tiny4linux-cli.git aur-repo

- name: Download packed tarballs and metadata
uses: actions/download-artifact@v5
with:
name: tarballs
path: aur-repo

- name: Commit & Push to the AUR
working-directory: aur-repo
run: |
cp -a deployment/cli/aur/. .
git config user.name "OpenFoxes Maintenance Bot"
git config user.email "[email protected]"
git add PKGBUILD .SRCINFO LICENSE
git commit -m "Update to Version ${{ github.event.inputs.version }}"
git push

cleanup:
name: Cleanup
runs-on: ubuntu-latest
needs: [deploy-aur]
needs: [deploy-aur-gui, deploy-aur-cli]
steps:
- name: Delete artifacts
uses: geekyeggo/delete-artifact@v5
Expand Down
22 changes: 22 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

81 changes: 80 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ enum_dispatch = "0.3.13"
thiserror = "2.0.0"
hexdump = "0.1.2"
clap = { version = "4.4.18", features = ["derive"] }
clap_complete = "4.5.59"
dialoguer = { version = "0.12.0", features = ["fuzzy-select"] }

[[bin]]
name = "tiny4linux-gui"
path = "src/gui/main.rs"

[[bin]]
name = "tiny4linux-cli"
path = "src/cli/main.rs"
12 changes: 12 additions & 0 deletions deployment/cli/aur/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Copyright Arch Linux Contributors

Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 changes: 23 additions & 0 deletions deployment/cli/aur/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Maintainer: Bono Fox <[email protected]>

pkgname=tiny4linux-cli
pkgver=1.4.3
pkgrel=1
pkgdesc="A command line interface for controlling the OBSBOT Tiny series."
arch=('x86_64')
url="https://github.com/OpenFoxes/Tiny4Linux"
license=('EUPL')
categories=('Utility')
depends=()
makedepends=('rust' 'cargo')
source=("$url/releases/download/v$pkgver/tiny4linux-$pkgver.tar.gz")
sha256sums=('SKIP')

build() {
cargo build --release --locked
}

package() {
install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
ln -s "/usr/bin/$pkgname" "$pkgdir/usr/bin/t4l"
}
Loading