Compare commits

...

4 commits
1.3.0 ... main

Author SHA1 Message Date
Stephen Seo 741111fe8c Add forgejo action to make releases for tags
All checks were successful
Create releases with ArchLinux pkg / check-and-build-and-release (push) Successful in 5s
2024-01-29 13:38:58 +09:00
Stephen Seo 287e3d98d8 Update LICENSE year 2024-01-27 22:09:49 +09:00
Stephen Seo b40f3daff7 Refactor archLinuxPackaging/PKGBUILD 2024-01-27 21:57:32 +09:00
Stephen Seo 2d7ddc1c2f Update archlinux packaging 2024-01-26 17:54:26 +09:00
3 changed files with 76 additions and 7 deletions

View file

@ -0,0 +1,71 @@
name: Create releases with ArchLinux pkg
on:
push:
branches:
- '*'
jobs:
check-and-build-and-release:
runs-on: any_archLinux
steps:
- name: Get tags
run: |
curl --fail-with-body -X 'GET' \
'https://git.seodisparate.com/api/v1/repos/stephenseo/obs-studio-plugin-unix-socket-control/tags' \
-H 'accept: application/json' -o tags.json -w '%output{header_count}%header{x-total-count}' 2>/dev/null \
- name: Fetch repo
run: git clone https://git.seodisparate.com/stephenseo/obs-studio-plugin-unix-socket-control.git obs_usc
- name: Fetch PKGBUILD
run: pushd obs_usc >&/dev/null && git checkout main && popd >&/dev/null && cp obs_usc/archLinuxPackaging/PKGBUILD ./
- name: Check tags and build per release
run: |
SAVED_DIR="$(pwd)"
TAG_COUNT="$(cat ./header_count)"
for ((i=0; i<$TAG_COUNT; ++i)); do
echo "$(jq ".[$i].name" < ./tags.json | tr -d '"')" >> tempList
done
sort -V < tempList > versionList
for ((i=0; i<$TAG_COUNT; ++i)); do
cd "$SAVED_DIR"
TAG_NAME="$(sed -n "$((i+1))p" ./versionList)"
curl -X 'GET' "https://git.seodisparate.com/api/v1/repos/stephenseo/obs-studio-plugin-unix-socket-control/releases/tags/${TAG_NAME}" -H 'accept: application/json' -w '%output{http_code}%{http_code}' >&/dev/null
if [[ $(cat ./http_code) != "404" ]]; then
continue
fi
echo "Trying to build and release \"$TAG_NAME\"..."
mkdir -p "build_${TAG_NAME}" || continue
cp ./PKGBUILD "build_${TAG_NAME}/" || continue
sed -i "s/^pkgver=.*\$/pkgver=${TAG_NAME}/" "build_${TAG_NAME}/PKGBUILD" || continue
sed -i 's/^pkgrel=.*$/pkgrel=1/' "build_${TAG_NAME}/PKGBUILD" || continue
sed -i 's/^sha256sums=.*$/sha256sums=("SKIP")/' "build_${TAG_NAME}/PKGBUILD" || continue
cd "build_${TAG_NAME}" || continue
makepkg || continue
curl --fail-with-body -X 'POST' \
"https://git.seodisparate.com/api/v1/repos/stephenseo/obs-studio-plugin-unix-socket-control/releases" \
-H 'accept: application/json' \
-H "Authorization: token ${GITHUB_TOKEN}" \
-H 'Content-Type: application/json' \
-d "{
\"name\": \"OBS Plugin Unix Socket Control version ${TAG_NAME}\",
\"body\": \"\",
\"tag_name\": \"${TAG_NAME}\"
}" > release_response.json || continue
curl --fail-with-body -X 'POST' \
"https://git.seodisparate.com/api/v1/repos/stephenseo/obs-studio-plugin-unix-socket-control/releases/$(jq .id < release_response.json)/assets" \
-H 'accept: application/json' \
-H "Authorization: token ${GITHUB_TOKEN}" \
-H 'Content-Type: multipart/form-data' \
-F "attachment=@obs-studio-plugin-unix-socket-control-${TAG_NAME}-1-x86_64.pkg.tar.zst;type=application/zstd" > release_asset.json || continue
done

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2023 Stephen Seo
Copyright (c) 2023-2024 Stephen Seo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -1,5 +1,5 @@
pkgname=obs-studio-plugin-unix-socket-control
pkgver=1.2.1
pkgver=1.3.0
pkgrel=1
pkgdesc="An obs studio plugin to command obs to start/stop recording/streaming via unix socket"
arch=(x86_64)
@ -8,14 +8,12 @@ license=('MIT')
depends=(obs-studio)
makedepends=(cmake)
source=("${pkgname}_${pkgver}.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=(ce761a3d044906fc6125077f9a73bca31f2caa44e50cb37e36e124c08752e8ae)
sha256sums=(259ea3e490da13dd98b5593571310b7f0abab926be8436b00a272ca768b08eac)
build() {
cd "$pkgname"
mkdir buildRelease
cd buildRelease
cmake -DCMAKE_BUILD_TYPE=Release ..
make
cmake -S . -B buildRelease -DCMAKE_BUILD_TYPE=Release
make -C buildRelease
}
package() {