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
133 changes: 121 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ jobs:
- name: Update package version
run: cargo set-version ${{ github.event.inputs.version }}

- name: Add a commit
run: |
git config --global user.name 'OpenFoxes Maintenance Bot'
git config --global user.email '[email protected]'
git init
git add .
git commit -m "🔖 Release Tiny4Linux ${{ github.event.inputs.version }}"
git tag v${{ github.event.inputs.version }}
git push -u origin HEAD:main --tags

- name: Upload working directory with current version-number
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -68,17 +58,101 @@ jobs:
path: .
retention-days: 1

update-metadata:
name: Update metadata
runs-on: ubuntu-latest
needs: [update-version]
steps:
- name: Download build artifacts
uses: actions/download-artifact@v5
with:
name: versioned-build

- name: Generate tarball from current repo
run: |
VERSION=${{ github.event.inputs.version }}
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
run: |
VERSION=${{ github.event.inputs.version }}
sha=$(sha256sum tiny4linux-${VERSION}.tar.gz | cut -d' ' -f1)

cd deployment/gui/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:
name: tarballs
include-hidden-files: true
path: |
tiny4linux-${{ github.event.inputs.version }}.tar.gz
tiny4linux-${{ github.event.inputs.version }}.zip
deployment/gui/aur/PKGBUILD
deployment/gui/aur/.SRCINFO
deployment/gui/aur/LICENSE
retention-days: 1

add-version-commit:
name: Add version commit
runs-on: ubuntu-latest
needs: [update-version, update-metadata]
steps:
- name: Download working directory with current version-number
uses: actions/download-artifact@v5
with:
name: versioned-build
path: .

- name: Download updated metadata
uses: actions/download-artifact@v5
with:
name: tarballs
path: .

- name: Add a commit
run: |
git config --global user.name 'OpenFoxes Maintenance Bot'
git config --global user.email '[email protected]'
git init
git add .
git commit -m "🔖 Release Tiny4Linux ${{ github.event.inputs.version }}"
git tag v${{ github.event.inputs.version }}
git push -u origin HEAD:main --tags

create-github-release:
name: 'Create GitHub release'
runs-on: ubuntu-latest
needs: [build]
needs: [build, update-metadata, add-version-commit]
steps:
- name: Download build artifacts
uses: actions/download-artifact@v5
with:
name: build-artifact
path: .

- name: Download metadata
uses: actions/download-artifact@v5
with:
name: tarballs
path: .

- uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.BOT_TOKEN }}
Expand All @@ -87,15 +161,50 @@ jobs:
files: |
target/release/tiny4linux-gui
target/release/obsbot-osc-server
tiny4linux-${{ github.event.inputs.version }}.tar.gz
tiny4linux-${{ github.event.inputs.version }}.zip

deploy-aur:
name: 'Deployment 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-gui.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/gui/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: [create-github-release]
needs: [deploy-aur]
steps:
- name: Delete artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: |
versioned-build
build-artifact
tarballs
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: EUPL-1.2

/target
tiny4linux-1.4.1.tar.gz
tiny4linux-1.4.1.zip
5 changes: 5 additions & 0 deletions deployment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This directory contains metadata for the distribution channels through which Tiny4Linux can be obtained.
Currently, only the Arch User Repository (AUR) is supported.
In the future, other options such as Flatpak may also be considered.

The project is distributed in both the GUI and CLI versions.
12 changes: 12 additions & 0 deletions deployment/gui/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.
25 changes: 25 additions & 0 deletions deployment/gui/aur/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Maintainer: Bono Fox <[email protected]>

pkgname=tiny4linux-gui
pkgver=1.4.0
pkgrel=1
pkgdesc="A graphical 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"

install -Dm755 "src/assets/icon.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/tiny4linux.png"
install -Dm755 "src/gui/tiny4linux.desktop" "$pkgdir/usr/share/applications/tiny4linux.desktop"
}
Binary file added src/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/assets/sources.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
| Element | Source | Files |
|--------------|---------------------------------------------------|-------------------------------------------|
| OBSBOT-Logos | https://www.obsbot.com/de/media-kit/obsbot-tiny-2 | obsbot-tiny-2.png, obsbot-tiny-2-side.png |
| OBSBOT-Logos | https://www.obsbot.com/de/media-kit/obsbot-tiny-2 | obsbot-tiny-2.png, obsbot-tiny-2-side.png |
| Icon | https://www.flaticon.com/free-icons/lens | icon.png |
10 changes: 10 additions & 0 deletions src/gui/tiny4linux.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Tiny4Linux
Comment=A graphical user interface for OBSBOT Tiny devices
Exec=tiny4linux-gui
Icon=tiny4linux
Terminal=false
Categories=Utility;System;
Keywords=linux;obsbot;tiny;utility;